Hi! New to casdoor. wonderful project. I'm trying to use android native google signin, get the google access token and then forward it to casdoor (a casdoor google provider is already created), do you know how to do the last part please ? I don't know which url endpoint call nor the arguments to auto create the user if not exist , and login in by returning a casdoor token.
as what I see I need to call some url with grant-type:token-exchange , is it correct ? Thank you
related to https://auth0.com/docs/authenticate/identity-providers/social-identity-providers/facebook-native
you can use casdoor-android-sdk
and it has an example
Hi, from my client I got a google access_token and id_token that I validated, is there a way to create or signin with these tokens against a casdoor instance please ? like createUser and assign the refresh_token inside google property? best regards
what's this ? "like createUser and assign the refresh_token inside google property?"
Create user in Casdoor or create user in Google?
Do you want to authenticate against Casdoor REST API via google access_token and id_token?
Yes exactly, I want to authenticate against Casdoor REST API via google access_token and id_token from the mobile native google signin with or without a backend layer. because Google enforce their native google signin for flutter; casdoor-flutter-sdk stop working for android /ios with google for 2 reasons: webview must have a correct useragent (I managed to fix that), but now, we can't set redirect url with special scheme in google console, need more work.
for the useragent I opened a MR https://github.com/casdoor/casdoor-flutter-sdk/pull/38
thanks for the PR!
can't you just set a special URL like "http://casdoor-app" in google admin portal and intercept that URL in the flutter webview?
You can and I will do like this but it's not as it was implemented inside the casdoor flutter sdk for mobile (it need a special scheme), and you need to have a correct useragent (my mr is just a quick patch, a real solution is to get it from the device), a real solution is to not use webview at all.
Join the conversation
Sign up to reply, like and follow topics.
Suggested Topics
Want to read more? Browse other topics in Casdoor or view latest topics.
