mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
Add innerParams.
This commit is contained in:
@ -43,8 +43,8 @@ export function trim(str, ch) {
|
||||
return (start > 0 || end < str.length) ? str.substring(start, end) : str;
|
||||
}
|
||||
|
||||
export function getOAuthGetParameters() {
|
||||
const queries = new URLSearchParams(window.location.search);
|
||||
export function getOAuthGetParameters(params) {
|
||||
const queries = (params !== undefined) ? params : new URLSearchParams(window.location.search);
|
||||
const clientId = queries.get("client_id");
|
||||
const responseType = queries.get("response_type");
|
||||
const redirectUri = queries.get("redirect_uri");
|
||||
@ -62,3 +62,12 @@ export function getOAuthGetParameters() {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export function getQueryParamsToState() {
|
||||
const query = window.location.search;
|
||||
return btoa(query);
|
||||
}
|
||||
|
||||
export function stateToGetQueryParams(state) {
|
||||
return atob(state);
|
||||
}
|
||||
|
Reference in New Issue
Block a user