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

Getting Platform Exception on Android #45

Closed
ewm003 opened this issue Aug 19, 2020 · 5 comments
Closed

Getting Platform Exception on Android #45

ewm003 opened this issue Aug 19, 2020 · 5 comments

Comments

@ewm003
Copy link

ewm003 commented Aug 19, 2020

Hoping to get some help. This is my first time using OAUTH2. I am currently just using a test app for my education to test the flow before I integrate it into my production app. I am authenticating with Teamsnap API, using the token flow. It is working great on iOS but on Android I have been running into issues. I think I got the call back issue fixed but now it looks like it authenticates but I get a null result from the authentication. Looks like the platform exception may be causing the issue.
Screen Shot 2020-08-18 at 7 32 45 PM
I am not canceling the login, just putting in my information and then clicking login, then it goes back to my app and I get the error above.

Here is what my code looks like,
Screen Shot 2020-08-18 at 7 40 47 PM

And my android manifest in case you need it.
Screen Shot 2020-08-18 at 7 44 54 PM

Thanks in advance for your help!

@albertpurnama
Copy link

I'm experiencing the same issue!

@putrikarunia
Copy link

Getting the same issue with android. Any help would be much appreciated 🙏

@albertpurnama
Copy link

Hey I found the issue, it's because the callbackUrlScheme provided in the authenticate function is incorrect.

@ewm003 try replacing your callbackUrlScheme from hcassistant://ejappdev.com to hcassistant and the redirect should be caught by the FlutterWebAuth properly.

@ewm003
Copy link
Author

ewm003 commented Aug 20, 2020

Thanks for looking at this!! I will give that a go and let you know how it turns out.

@ewm003
Copy link
Author

ewm003 commented Aug 21, 2020

That worked, it now gets the token from the server!! Thanks guys, it's amazing what another set of eyes will do, I had been staring at that code for a long time and hadn't even thought that would be the problem since it was working on the iOS version.

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

No branches or pull requests

3 participants