mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: deep link auth timer cleanup and reliability
- Clear previous interval/timeout before starting new deep link auth - Store expire timeout in ref for cleanup on unmount - Use server expires_in instead of hardcoded 5 minutes - Show error message when token expires (not just clear state) - Add consumeCampaignSlug/consumeReferralCode to loginWithDeepLink
This commit is contained in:
@@ -320,6 +320,8 @@ export const useAuthStore = create<AuthState>()(
|
||||
},
|
||||
|
||||
loginWithDeepLink: async (token) => {
|
||||
consumeCampaignSlug();
|
||||
consumeReferralCode();
|
||||
const response = await authApi.pollDeepLinkToken(token);
|
||||
tokenStorage.setTokens(response.access_token, response.refresh_token);
|
||||
set({
|
||||
|
||||
Reference in New Issue
Block a user