Skip to content

Commit

Permalink
Improve auth workflow for safari
Browse files Browse the repository at this point in the history
  • Loading branch information
255kb committed Aug 6, 2024
1 parent 726913e commit 5312007
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pages/app-auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ const AppAuth = function () {
},
onSuccess: async () => {
localStorage.removeItem('authCallback');
},
onError: async () => {
console.log('callback error');
}
});

Expand Down Expand Up @@ -75,6 +78,7 @@ const AppAuth = function () {
});
},
onSuccess: async (data) => {
// not safari
if (localStorage.getItem('authCallback')) {
// new workflow >= 9.0.0, using localhost callback
setCallbackWorkflow(true);
Expand Down

0 comments on commit 5312007

Please sign in to comment.