fix(oauth): persist successful login status across navigation

This commit is contained in:
lzt404 committed 2026-08-11 18:38:57 +08:00
1 parent 7b192cc6a4
commit be08a4bfdf
3 files changed
+58 -45

No files matched your search

+14
View File
@@ -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);
},
};
};