fix: set token before making auth verify request
This commit is contained in:
@@ -53,8 +53,8 @@ class ApiClient {
|
||||
// Auth
|
||||
async login(token) {
|
||||
try {
|
||||
this.setToken(token); // Set token BEFORE making request
|
||||
const data = await this.get('/auth/verify');
|
||||
this.setToken(token);
|
||||
return data;
|
||||
} catch (e) {
|
||||
this.setToken(null);
|
||||
|
||||
Reference in New Issue
Block a user