Skip to content

Commit

Permalink
use auth.redirect as setSession url
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Mar 7, 2024
1 parent a34c8b9 commit 51e993c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/houdini-react/src/runtime/routing/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,11 @@ export function useSession(): [App.Session, (newSession: Partial<App.Session>) =
ctx.setSession(newSession)

// figure out the url that we will use to send values to the server
let url = configFile.router?.auth?.url
if (!url) {
const auth = configFile.router?.auth
if (!auth) {
return
}
const url = 'redirect' in auth ? auth.redirect : auth.url

fetch(url, {
method: 'POST',
Expand Down

0 comments on commit 51e993c

Please sign in to comment.