Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions packages/gotrue/lib/src/gotrue_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ class GoTrueClient {
Map<String, dynamic>? data,
String? captchaToken,
}) async {
_removeSession();

final response = await _fetch.request(
'$_url/signup',
RequestMethodType.post,
Expand Down Expand Up @@ -194,8 +192,6 @@ class GoTrueClient {
assert((email != null && phone == null) || (email == null && phone != null),
'You must provide either an email or phone number');

_removeSession();

late final Map<String, dynamic> response;

if (email != null) {
Expand Down Expand Up @@ -261,8 +257,6 @@ class GoTrueClient {
required String password,
String? captchaToken,
}) async {
_removeSession();

late final Map<String, dynamic> response;

if (email != null) {
Expand Down Expand Up @@ -315,7 +309,6 @@ class GoTrueClient {
String? scopes,
Map<String, String>? queryParams,
}) async {
_removeSession();
return _getUrlForProvider(
provider,
url: '$_url/authorize',
Expand Down Expand Up @@ -393,8 +386,6 @@ class GoTrueClient {
String? nonce,
String? captchaToken,
}) async {
_removeSession();

if (provider != OAuthProvider.google &&
provider != OAuthProvider.apple &&
provider != OAuthProvider.kakao) {
Expand Down Expand Up @@ -458,8 +449,6 @@ class GoTrueClient {
String? captchaToken,
OtpChannel channel = OtpChannel.sms,
}) async {
_removeSession();

if (email != null) {
String? codeChallenge;
if (_flowType == AuthFlowType.pkce) {
Expand Down Expand Up @@ -530,10 +519,6 @@ class GoTrueClient {
assert((email != null && phone == null) || (email == null && phone != null),
'`email` or `phone` needs to be specified.');

if (type != OtpType.emailChange && type != OtpType.phoneChange) {
_removeSession();
}

final body = {
if (email != null) 'email': email,
if (phone != null) 'phone': phone,
Expand Down Expand Up @@ -584,7 +569,6 @@ class GoTrueClient {
'providerId or domain has to be provided.',
);

_removeSession();
String? codeChallenge;
String? codeChallengeMethod;
if (_flowType == AuthFlowType.pkce) {
Expand Down Expand Up @@ -676,10 +660,6 @@ class GoTrueClient {
'phone must be provided for type ${type.name}');
}

if (type != OtpType.emailChange && type != OtpType.phoneChange) {
_removeSession();
}

final body = {
if (email != null) 'email': email,
if (phone != null) 'phone': phone,
Expand Down