Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of RedirectPath as a parameter to init #86

Open
priyarath9 opened this issue Nov 28, 2022 · 1 comment
Open

Addition of RedirectPath as a parameter to init #86

priyarath9 opened this issue Nov 28, 2022 · 1 comment

Comments

@priyarath9
Copy link

We can add a new RedirectPath parameter to the init method, where the new parameter can be appended to the redirect URL for the app id instance.

await appID.init({
    clientId: '<SPA_CLIENT_ID>',
    discoveryEndpoint: '<WELL_KNOWN_ENDPOINT>',
    redirectPath: '<Redirect_Path>'
});
await this.openIdConfigResource.init({discoveryEndpoint, requestHandler: this.request});
this.redirectPath = redirectPath;
		this.popup.init(popup);
let origin = this.window.location.origin;
		if (!origin) {
			origin = this.window.location.protocol + "//" + this.window.location.hostname + (this.window.location.port ? ':' + this.window.location.port : '');
		}
if (this.redirectPath && this.redirectPath != '') {
    origin = origin + this.redirectPath;
}
@dventurait
Copy link
Contributor

@priyarath9 can you, please, provide some examples of how adding the redirectPath would be useful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants