✨(frontend) support 'silent' and 'returnTo' params in authUrl
Enhanced the authentication URL generation to support 'silent' and 'returnTo' query parameters. This allows initiating a silent login and specifying a custom return URL after auth.
This commit is contained in:
committed by
aleb_the_flash
parent
d167490c09
commit
2a8027deb0
@@ -1,5 +1,5 @@
|
||||
import { apiUrl } from '@/api/apiUrl'
|
||||
|
||||
export const authUrl = () => {
|
||||
return apiUrl('/authenticate')
|
||||
export const authUrl = (silent = false, returnTo = window.location.href) => {
|
||||
return apiUrl(`/authenticate?silent=${encodeURIComponent(silent)}&returnTo=${encodeURIComponent(returnTo)}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user