Hi Team Is there any way we can enable Google/Appl...
# ask-a-descoper
d
Hi Team Is there any way we can enable Google/Apple login without
descope.oauth
method in flutter SDK (Without opening web view and leveraging native sdk implementation). Our requirement is not to open web view and provide a better login experience.
s
@some-librarian-64280 can you help here ?
s
Hi @dry-pharmacist-23784, do you mean login using something like Sign in with Apple directly?
d
Yes something like this
s
I see. I’ll discuss it with the team and see if it’s something we can support.
d
Here is an example for Google & Apple These dialogs are the native implementations of the SDK instead of OAuth implementation which requires a web browser. With this implemented if we try google login in apple, it automatically detects the platform and open oAuth window to get user logged in.. but for same OS and Login type these default dialogs are displayed which are user friendly and logged in user is automatically fetched and displayed.
Hi @some-librarian-64280 any luck on this query
s
We’ve started looking into it but I don’t have an answer yet. I’ll get back to you with an update tomorrow.
d
ok thanks
@some-librarian-64280 @dazzling-oyster-96577 Could you please confirm if the user management has been released in the last update for the flutter sdk where We can make Update/delete user from the mobile app using the Flutter sdk?
I can see user object in the user session but i could not find any method related to user-management
s
Hey @dry-pharmacist-23784 User mgmt is usually done from backend and not mobile/frontend As those are less secured (how are you planning to prevent end user from deleting other user data ? )
Can you elaborate on use case ?
We did add some session mgmt capabilities to flutter lately - https://pub.dev/packages/descope#session-management
d
Use case is • As a user i signed up to the platform with Email Link using Signinorup method • How would i be able to update my name, phone number ?
Hi @square-vr-55083 Any luck on the user management?
s
@some-librarian-64280 @dazzling-oyster-96577 @salmon-night-88354 you share details ?
d
Also please on the native login with Google and apple
s
Copy code
const options = SignInOptions(customClaims: {"name": "{{user.name}}"});
    await Descope.otp.signIn(method: DeliveryMethod.email, loginId: email, options: options);
1
on native login, is it a blocker for you ? Any timeline you need this feature ?
d
SignInOptions let me receive custom claims in the jwt token.. my question was related to Manipulating user details using SDK methods.
For the google and apple native login.. is this something which is in ongoing status or it is something planned?
s
Yes there is a way. Just a second @dry-pharmacist-23784
Essentially, using the SDK, you can update any user details. This is an example of updating the display name. https://docs.descope.com/manage/users/#update-a-users-display-name Essentially if the user wants to make those changes, you authenticate them on the frontend, the frontend sends the details to the backend, validates the auth of the user, and then the backend calls the management SDK to perform the update.
However, it appears that when you login with google, it will override similarly to how SAML would override it and update the user.
You could use a custom field, however that stores their requested display name.
d
Okay.. basically once user signup/sign in using email, we need to setup server side scripts to update users and perform actions on the user data and there is no direct methods are available in the SDK.
s
For OAuth, no, for OTP, Magic Link, and Enchanted link, there are options to update phone and email via SDK, but not the username/etc.
So there are many items that would require to be updated via SDK: display name, any custom fields, etc.
d
In the documentation link, SDK is only supports NodeJS, Python or GO. My question is is there any way we can do this right from the app without invoking intermediary server?
s
You aren't using flows, correct?
d
Correct, I am using magic link option https://github.com/descope/descope-flutter
s
Let me look at the flutter SDK a bit deeper. @broad-mouse-94403 WRT flutter. Any thoughts as you've recently worked through it? You could use a flow as well. After a user is authenticated, have a flow published which can display the details the user would like to change.
b
The Descope flutter SDK doesn't support magic link yet, though we will soon. You can track progress in this PR: https://github.com/descope/descope-flutter/pull/22
s
However, without flows, I think in the current state, you'd need to post to backend, and then the backend post the updated details to Descope. @late-spoon-95735 correct? This can't be done natively within the flutter SDK?
d
But i am currently using magic link and i am able to authenticate users with the link received in the email
Copy code
const options = d.SignInOptions(customClaims: {"email": "{{user.email}}","name": "{{user.name}}"});
// Every user must have a loginID. All other user information is optional
    final maskedEmail = await Descope.magicLink.signUpOrIn(method: DeliveryMethod.email, loginId: emailController.text,options:
And i am verifying the same token using
Copy code
AuthenticationResponse response = await Descope.magicLink.verify(token: token.value);
b
Oh apologies, i think magic link works if you're not using flows
1
l
Correct @broad-mouse-94403. It has already been added to flows, and will be released shortly.