Skip to content

Commit 59c298c

Browse files
chore: debug Apple SSO further
1 parent 961837d commit 59c298c

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

components/AuthModal.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,19 @@ export const AuthModal: React.FC<AuthModalProps> = ({
123123
};
124124

125125
const handleAppleSignIn = async () => {
126+
// Debug: Store that modal function was called
127+
if (typeof window !== "undefined") {
128+
try {
129+
sessionStorage.setItem(
130+
"apple_modal_handler_called",
131+
new Date().toISOString(),
132+
);
133+
(window as any).appleModalHandlerCalled = true;
134+
} catch (e) {
135+
// Ignore storage errors
136+
}
137+
}
138+
126139
setIsLoading(true);
127140
try {
128141
// Save last used method

contexts/AuthContext.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,19 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children }) => {
9898
};
9999

100100
const signInWithApple = async () => {
101+
// Debug: Store that this function was called
102+
if (typeof window !== "undefined") {
103+
try {
104+
sessionStorage.setItem(
105+
"apple_auth_context_called",
106+
new Date().toISOString(),
107+
);
108+
(window as any).appleAuthContextCalled = true;
109+
} catch (e) {
110+
// Ignore storage errors
111+
}
112+
}
113+
101114
try {
102115
const result = await AuthService.createAppleSession();
103116
return {

0 commit comments

Comments
 (0)