fix(frontend/oidc): Prefix frontend base to redirect URL
This commit is contained in:
parent
57e2a33dc6
commit
44122bfe6b
|
|
@ -1,3 +1,4 @@
|
|||
import {getFullBaseUrl} from '@/helpers/getFullBaseUrl'
|
||||
import {createRandomID} from '@/helpers/randomId'
|
||||
import type {IProvider} from '@/types/IProvider'
|
||||
import {parseURL} from 'ufo'
|
||||
|
|
@ -6,7 +7,8 @@ export function getRedirectUrlFromCurrentFrontendPath(provider: IProvider): stri
|
|||
// We're not using the redirect url provided by the server to allow redirects when using the electron app.
|
||||
// The implications are not quite clear yet hence the logic to pass in another redirect url still exists.
|
||||
const url = parseURL(window.location.href)
|
||||
return `${url.protocol}//${url.host}/auth/openid/${provider.key}`
|
||||
const base = getFullBaseUrl()
|
||||
return `${url.protocol}//${url.host}${base}auth/openid/${provider.key}`
|
||||
}
|
||||
|
||||
export const redirectToProvider = (provider: IProvider) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue