Skip to content

Commit

Permalink
Merge pull request #388 from scientist-softserv/321-restore-login
Browse files Browse the repository at this point in the history
321-restore-login
  • Loading branch information
alishaevn authored Feb 28, 2024
2 parents eb6224f + 26be1d4 commit 2c1650b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/api/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export const fetcher = (url, token) => {
.then(res => res.data)
.catch(error => {
Sentry.captureException(error)
throw error
// the `signIn` function from "next-auth/react" uses `fetcher` and returns a 404 error response. throwing that error causes an
// `OAUTH_CALLBACK_HANDLER_ERROR`, which prevents users from signing in. `signIn` doesn't pass a url to `fetcher`. the check below
// ensures that other errors still get thrown
if (error.config.url !== null) throw error
})
}

Expand Down

0 comments on commit 2c1650b

Please sign in to comment.