mentorship-flutter icon indicating copy to clipboard operation
mentorship-flutter copied to clipboard

feat: Social Logins Implementation

Open PaRaDoX50 opened this issue 3 years ago • 2 comments

Description

Added Google Sign In to the app. Was not able to implement Apple Sign In as it requires setting up a paid apple developers account. This change depends on PR 719 of mentorship-backend which is not merged yet.Therefore, merged PR 719's code with the forked mentorship-backend repo and used it as backend.

For setting up google sign in for android: 1.) Create a google console project. 2.) Create OAuth client id for web app(Use this client id in backend) and android(by putting in correct application id and sha1 code). 3.) Under res/values/strings.xml put

 <?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="default_web_client_id">{Web app Client id goes here}</string>
</resources>

(As you need a backend client id for extracting idToken after google sign in, refer documentation) . 4.) Make sure you use the same web app client id in backend.

For iOS: I have not tested the code in iOS as a mac is not available to me.

Fixes #137 (Not completely)

Flutter Channel:

  • [x] I have used the Flutter Beta channel on my local machine

Type of Change:

  • Code

Code/Quality Assurance Only

  • This change requires a documentation update (software upgrade on readme file)
  • New feature (non-breaking change which adds functionality pre-approved by mentors)

How Has This Been Tested?

Sign In: signin

Logout: logout

Google Sign In works as it should but breaks change password feature.

Checklist:

Delete irrelevant options.

  • [X] My PR follows the style guidelines of this project
  • [X] I have performed a self-review of my own code or materials
  • [ ] I have commented my code or provided relevant documentation, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] Any dependent changes have been merged

Code/Quality Assurance Only

  • [X] My changes generate no new warnings
  • [X] My PR currently breaks something (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Any dependent changes have been published in downstream modules

PaRaDoX50 avatar Jan 12 '21 22:01 PaRaDoX50

@yugantarjain does the password feature break on iOS too? Any workaround?

techno-disaster avatar Jan 17 '21 15:01 techno-disaster

@yugantarjain does the password feature break on iOS too? Any workaround?

@anitab-org/mentorship-ios-maintainers Could anyone of you confirm if this was the case on ios too? If yes any workarounds?

Thanks!

techno-disaster avatar Jan 25 '21 18:01 techno-disaster