File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,8 @@ class GoTrueClient {
190190 /// [data] sets [User.userMetadata] without an extra call to [updateUser]
191191 ///
192192 /// [channel] Messaging channel to use (e.g. whatsapp or sms)
193+ ///
194+ /// [saveSession] save the user session after signUp
193195 Future <AuthResponse > signUp ({
194196 String ? email,
195197 String ? phone,
@@ -198,6 +200,7 @@ class GoTrueClient {
198200 Map <String , dynamic >? data,
199201 String ? captchaToken,
200202 OtpChannel channel = OtpChannel .sms,
203+ bool saveSession = true ,
201204 }) async {
202205 assert ((email != null && phone == null ) || (email == null && phone != null ),
203206 'You must provide either an email or phone number' );
@@ -252,7 +255,7 @@ class GoTrueClient {
252255 final authResponse = AuthResponse .fromJson (response);
253256
254257 final session = authResponse.session;
255- if (session != null ) {
258+ if (session != null && saveSession ) {
256259 _saveSession (session);
257260 notifyAllSubscribers (AuthChangeEvent .signedIn);
258261 }
You can’t perform that action at this time.
0 commit comments