mirror of
https://github.com/janishutz/oidc-login-sdk.git
synced 2026-10-08 17:36:20 +02:00
feat: return to URL in browser sdk
This commit is contained in:
1 parent
b50eb2bc74
commit
8246f4fdcc
1 file changed
+2
-2
+2
-2
@@ -3,9 +3,9 @@ import request, {
|
||||
} from './request.js';
|
||||
import config from './config.js';
|
||||
|
||||
export const login = () => {
|
||||
export const login = ( returnTo?: string ) => {
|
||||
sessionStorage.setItem( 'redirect', location.pathname );
|
||||
location.href = config.get().loginEndpoint ?? '/auth/v2/login';
|
||||
location.href = ( config.get().loginEndpoint ?? '/auth/v2/login' ) + returnTo ? returnTo : '';
|
||||
};
|
||||
|
||||
export const check = async () => {
|
||||
|
||||
Reference in new issue
Block a user