Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(android): separate messages for signin exception #176

Merged
merged 2 commits into from
Feb 1, 2022

Conversation

hoi4
Copy link
Contributor

@hoi4 hoi4 commented Feb 1, 2022

In order to properly react to the situation where a user cancels the flow, I added the status code to the Android implementation. The iOS returns the same message in case the user cancels the flow: "The user canceled the sign-in flow."

For me this is the last step in order to make this plugin a full replacement for the cordova-plugin-googleplus which also returns the status code.

@hoi4
Copy link
Contributor Author

hoi4 commented Feb 1, 2022

@reslear Could you maybe add this PR to your fork? Thank you!

@reslear
Copy link
Collaborator

reslear commented Feb 1, 2022

and for iOS same?

@hoi4
Copy link
Contributor Author

hoi4 commented Feb 1, 2022

@reslear I added the iOS status code. The cordova-plugin-googleplus does not include it. As the status codes are different for iOS and Android, the user of the plugin has to check the platform and then check for the respective error code:

In the future we could provide a custom enum to unify this maybe.

@reslear reslear changed the title added status code for android implementation refactor(android): separate messages for signin exception Feb 1, 2022
@reslear reslear merged commit 585c8bd into CodetrixStudio:master Feb 1, 2022
reslear pushed a commit to reslear/CapacitorGoogleAuth that referenced this pull request Feb 1, 2022
…udio#176)

* added status code for android implementation

* added iOS error code

Co-authored-by: Philipp Heuer <[email protected]>
@reslear
Copy link
Collaborator

reslear commented Feb 1, 2022

done, @reslear/[email protected]

@hoi4 hoi4 deleted the android-provide-status branch February 2, 2022 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants