Skip to content

Commit 162067e

Browse files
chore: debug Apple SSO
1 parent 481e3e8 commit 162067e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/appwrite/auth.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,20 @@ export class AuthService {
148148
redirectUrl,
149149
);
150150

151+
// Debug: Store what we actually got back from Appwrite
152+
if (typeof window !== "undefined") {
153+
try {
154+
sessionStorage.setItem("apple_oauth_response_type", typeof url);
155+
sessionStorage.setItem(
156+
"apple_oauth_response_value",
157+
JSON.stringify(url),
158+
);
159+
(window as any).appleOAuthResponse = url;
160+
} catch (e) {
161+
// Ignore storage errors
162+
}
163+
}
164+
151165
if (typeof url === "string") {
152166
// Store success info
153167
if (typeof window !== "undefined") {

0 commit comments

Comments
 (0)