Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-1636

Enable social login using Google

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Attachments

        Issue Links

          Activity

          Hide
          Narendra Narendra Kumar Vankayala (Inactive) added a comment -

          Please review the changes.

          https://bitbucket.org/narendravankayala/appstore-narendra/branch/IGBF-1636

          Here I have used my personal Google account to create Oauth2 Client ID and Secret Keys. We need to change accordingly in settings.py if we want to use IGBs Google account

          Show
          Narendra Narendra Kumar Vankayala (Inactive) added a comment - Please review the changes. https://bitbucket.org/narendravankayala/appstore-narendra/branch/IGBF-1636 Here I have used my personal Google account to create Oauth2 Client ID and Secret Keys. We need to change accordingly in settings.py if we want to use IGBs Google account
          Hide
          ann.loraine Ann Loraine added a comment - - edited
          • Functional review completed with no error. Was able to set up and run database. Clicking on "login" triggered request to Google auth service, but halted due to expected OATH error:

          "The redirect URI in the request, http://127.0.0.1:8000/accounts/complete/google-oauth2/, does not match the ones authorized for the OAuth client."

          • I am not sure how a developer can register a redirect URL that references localhost. Srishti Tiwari found a workaround for the Cyverse integration project.
          • Please submit a pull request.
          Show
          ann.loraine Ann Loraine added a comment - - edited Functional review completed with no error. Was able to set up and run database. Clicking on "login" triggered request to Google auth service, but halted due to expected OATH error: "The redirect URI in the request, http://127.0.0.1:8000/accounts/complete/google-oauth2/ , does not match the ones authorized for the OAuth client." I am not sure how a developer can register a redirect URL that references localhost. Srishti Tiwari found a workaround for the Cyverse integration project. Please submit a pull request.
          Hide
          Narendra Narendra Kumar Vankayala (Inactive) added a comment -

          Please review the changes :

          https://bitbucket.org/narendravankayala/appstore-narendra/src/IGBF-1636/

          I have removed generated migration files in Download and submit_app folders.

          Show
          Narendra Narendra Kumar Vankayala (Inactive) added a comment - Please review the changes : https://bitbucket.org/narendravankayala/appstore-narendra/src/IGBF-1636/ I have removed generated migration files in Download and submit_app folders.
          Hide
          ann.loraine Ann Loraine added a comment - - edited

          Some notes:

          • There is no problem with redirecting to localhost.
          • To use settings.py keys, you must open http://localhost:8000
          • For test and production sites, make new keys
          Show
          ann.loraine Ann Loraine added a comment - - edited Some notes: There is no problem with redirecting to localhost. To use settings.py keys, you must open http://localhost:8000 For test and production sites, make new keys
          Hide
          ann.loraine Ann Loraine added a comment -

          Merged to master branch.
          To-do:

          • Add documentation to Google doc referenced in the project README.md explaining how a developer can create and deploy their own client secret and key for social authentication.
          Show
          ann.loraine Ann Loraine added a comment - Merged to master branch. To-do: Add documentation to Google doc referenced in the project README.md explaining how a developer can create and deploy their own client secret and key for social authentication.
          Hide
          ann.loraine Ann Loraine added a comment -

          Re-assigning to original developer for easier retrieval later on.

          Show
          ann.loraine Ann Loraine added a comment - Re-assigning to original developer for easier retrieval later on.
          Hide
          Narendra Narendra Kumar Vankayala (Inactive) added a comment - - edited

          Setting up own Google Oauth Key and secret key for social authentication

          1. Login into Google developer console – https://www.console.developers.google.com
          2. Navigate to Credential Section in the left menu
          3. Create a project (Note: it's not able to create the project with UNCC email id )
          4. Give a descriptive name to the project
          5. Go to OAuth Consent Screen --> Fill the "Application name" which will be displayed while users try Sign in using Google – > Save
          6. Click Create the credentials --> Select OAuth Client ID
          6. Select web application – > Create
          7. In Authorized redirect URIs Add - http://localhost:8000/accounts/complete/google-oauth2/
          If you want to test in production or test site – replace localhost with the domain name at http://yourdomainname.com/accounts/complete/google-oauth2/
          Click Create
          8. You will get a pop with Client ID and Client Secret – Save it or You can access through by selecting the project at any time
          9. Go to Dashboard, Click ENABLE APIS AND SERVICES, and select Google+ API and Enable
          10. Open the Settings.py file and paste the client id and client secret at SOCIAL_AUTH_GOOGLE_OAUTH2_KEY and SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET respectively
          11. You're Done

          Show
          Narendra Narendra Kumar Vankayala (Inactive) added a comment - - edited Setting up own Google Oauth Key and secret key for social authentication 1. Login into Google developer console – https://www.console.developers.google.com 2. Navigate to Credential Section in the left menu 3. Create a project (Note: it's not able to create the project with UNCC email id ) 4. Give a descriptive name to the project 5. Go to OAuth Consent Screen --> Fill the "Application name" which will be displayed while users try Sign in using Google – > Save 6. Click Create the credentials --> Select OAuth Client ID 6. Select web application – > Create 7. In Authorized redirect URIs Add - http://localhost:8000/accounts/complete/google-oauth2/ If you want to test in production or test site – replace localhost with the domain name at http://yourdomainname.com/accounts/complete/google-oauth2/ Click Create 8. You will get a pop with Client ID and Client Secret – Save it or You can access through by selecting the project at any time 9. Go to Dashboard, Click ENABLE APIS AND SERVICES, and select Google+ API and Enable 10. Open the Settings.py file and paste the client id and client secret at SOCIAL_AUTH_GOOGLE_OAUTH2_KEY and SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET respectively 11. You're Done
          Hide
          Narendra Narendra Kumar Vankayala (Inactive) added a comment -

          Added Setting up Developers Oauth and Secret Key in Google Doc - referenced in the project README.md file

          Show
          Narendra Narendra Kumar Vankayala (Inactive) added a comment - Added Setting up Developers Oauth and Secret Key in Google Doc - referenced in the project README.md file

            People

            • Assignee:
              Narendra Narendra Kumar Vankayala (Inactive)
              Reporter:
              ann.loraine Ann Loraine
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: