-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
feat: Add saveSession option in goture_client signUp method #1053
Conversation
Why would one want to add extra steps for the users? I guess it's not the same, but you can set the await Supabase.initialize(
url: supabaseUrl,
anonKey: supabaseKey,
debug: false,
authOptions: FlutterAuthClientOptions(
autoRefreshToken: false,
),
); |
I think it is just about app behavior. Most apps including GitHub asks a user to login again after successful sign up.
|
@htoopyaelinn56 Hmm, why do you want the user to sign in again when the user is already signed in? There is no real benefit to having them sign out right after they sign up. If you really want to do this today, you could just call |
This is about applications' business logic other than benefits. As I mentioned, some apps including even GitHub asks a user to login again after the registration. Justing calling |
Sorry, my comment here stands and I'm closing this. |
hey @htoopyaelinn56 . I can see the use-case for this but I think it's important that it happens on the server and not on the client (since a malicious actor could still access the session token in the API response even if you decide to drop it in the app). Currently to my knowledge the session token is not returned when awaiting email signup confirmation. Which signup mechanism are you using? and do you use email confirmations? |
@kangmingtay I have a question. If SECURITY_UPDATE_PASSWORD_REQUIRE_REAUTHENTICATION is set to true, on sign up - will the user be required to re-authenticate? or does this config only affect password resets? If it doesn't affect signups (for cases where MAILER_AUTOCONFIRM is true), perhaps it could be useful functionality 🤔. Although it may have to be a new config, to give more granular control. |
Hi @awalias. Thanks for the response. I'm using email auth and set auto confirmation to true. We have the existing auth service and use supabase auth just to access database. Sorry if my use-case is a bit complex. |
What kind of change does this PR introduce?
Feature
What is the current behavior?
When the user successfully signup, goture_client will automatically saves the user session.
What is the new behavior?
Ability to set the saveSession option in case we don't want to save the user's session after signup for some app that the user have to login after successful signup.