Skip to content

Commit

Permalink
param needs to be next, not redirect_url
Browse files Browse the repository at this point in the history
  • Loading branch information
gumaerc committed Feb 8, 2024
1 parent 5768ae3 commit 839af6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function initLoginButton(
const parsedBaseUrl = new URL(baseUrl)
const currentUserUrl = `${parsedBaseUrl.origin}/api/v0/users/me/?format=json`
const redirectUrlParam =
redirectUrl !== "" ? `?redirect_url=${encodeURIComponent(redirectUrl)}` : ""
redirectUrl !== "" ? `?next=${encodeURIComponent(redirectUrl)}` : ""
const loginUrl = `${parsedBaseUrl.origin}/login/ol-oidc/${redirectUrlParam}`
fetch(currentUserUrl, {
method: "GET",
Expand Down

0 comments on commit 839af6d

Please sign in to comment.