Xamarin Custom google login

So we have been using auth0 in our xamarin ios/android application for a while now. But leaving the app to login via a web browser is undesirable.

So I am tasked with making a custom login screen. I’ve so far seen success with custom username/password and AD using the oauth/ro api. I’ve been able to get facebook social login working as well using this nuget package https://www.nuget.org/packages/Plugin.FacebookClient/ and then using the Access token from this result with the oauth/token api and subject_token/subject_token_type.

Now I come to google social login. The creators of the previously mentioned nuget package have also made one for Google. I’ve implemented this successfully and have been able to get a google token. However, oauth/token api does not appear to have a subject_token_type to accept google tokens.

I’ve tried following documentation regarding Authorization flow using first the /authorize api. However, when doing this the result is just “Not Found” instead of the code I expected. https://auth0.com/docs/flows/add-login-auth-code-flow

I’m not sure where to go from here as it looks like that flow is more for web apps and not mobile apps. Or maybe it’s my callback url. which is taking the following form (so far I’ve only tried this on android). androidpackagename://auth0domain/android/androidpackagename/callback

Any guidance on how to proceed would be excellent. This is the only other required social connection, so it would be a real shame if we couldn’t implement custom login just because I can’t get google working.

Thanks,

Hey @joshua.tanton, Just posting my initial response in the ticket here as well for general visibility

Currently as if now we don’t support the Google Social Native login.

Facebook and Apple are supported for Native login, that’s why Facebook Worked


Native support is mentioned at the bottom of this page.

Currently options for google will be to use web login(browser based), or use Google SDK directly but not use Auth0 for that, managing google users separately.

Regards,
Sidharth Chaudhary

2 Likes

Thanks for sharing it here with the rest of community Sidharth!

1 Like