fix(oauth): persist successful login status across navigation
This commit is contained in:
1 parent
7b192cc6a4
commit
be08a4bfdf
3 files changed
+58
-45
No files matched your search
@@ -0,0 +1,14 @@
|
||||
export const shouldShowOAuthLoginStatus = (status: string) => status === 'success';
|
||||
|
||||
export const createOAuthLoginSuccessCache = <T extends string>() => {
|
||||
const providers = new Set<T>();
|
||||
|
||||
return {
|
||||
mark(provider: T) {
|
||||
providers.add(provider);
|
||||
},
|
||||
snapshot() {
|
||||
return Array.from(providers);
|
||||
},
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user