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

          ann.loraine Ann Loraine made changes -
          Workflow Fall 2019 Workflow Update [ 20085 ] Revised Fall 2019 Workflow Update [ 22219 ]
          ann.loraine Ann Loraine made changes -
          Workflow Loraine Lab Workflow [ 18357 ] Fall 2019 Workflow Update [ 20085 ]
          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
          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
          ann.loraine Ann Loraine made changes -
          Link This issue relates to IGBF-1436 [ IGBF-1436 ]
          ann.loraine Ann Loraine made changes -
          Assignee Narendra Kumar Vankayala [ narendra ]
          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.
          ann.loraine Ann Loraine made changes -
          Resolution Done [ 10000 ]
          Status Needs Testing [ 10002 ] Closed [ 6 ]
          ann.loraine Ann Loraine made changes -
          Status Pull Request Submitted [ 10101 ] Needs Testing [ 10002 ]
          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 - - 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
          Narendra Narendra Kumar Vankayala (Inactive) made changes -
          Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
          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.
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] Ready for Pull Request [ 10304 ]
          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.
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          Narendra Narendra Kumar Vankayala (Inactive) made changes -
          Assignee Ann Loraine [ aloraine ]
          Narendra Narendra Kumar Vankayala (Inactive) made changes -
          Assignee Narendra Kumar Vankayala [ narendra ] Ann Loraine [ aloraine ]
          Narendra Narendra Kumar Vankayala (Inactive) made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          Narendra Narendra Kumar Vankayala (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          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
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          ann.loraine Ann Loraine made changes -
          Link This issue is blocked by IGBF-1394 [ IGBF-1394 ]
          ann.loraine Ann Loraine made changes -
          Field Original Value New Value
          Epic Link IGBF-1388 [ 17463 ]
          ann.loraine Ann Loraine created issue -

            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: