We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74ed80e commit 70796c5Copy full SHA for 70796c5
src/application/services/js-services/http/gotrue.ts
@@ -67,17 +67,17 @@ export async function signInOTP ({
67
const data = response?.data;
68
69
if (data) {
70
- if (data.code !== 0) {
+ if (!data.code) {
71
+ refreshSessionToken(JSON.stringify(data));
72
+ emit(EventType.SESSION_VALID);
73
+ afterAuth();
74
+ } else {
75
emit(EventType.SESSION_INVALID);
76
return Promise.reject({
77
code: data.code,
78
message: data.msg,
79
});
80
}
-
- refreshSessionToken(JSON.stringify(data));
- emit(EventType.SESSION_VALID);
- afterAuth();
81
} else {
82
83
0 commit comments