-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addressing PR comments, moved stateless signIn functions to their own…
… module, simplified RedirectFromOAuth REBASE
- Loading branch information
Showing
10 changed files
with
149 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React, { useState } from 'react'; | ||
import { createRoot } from 'react-dom/client'; | ||
import { OidcBroker } from './oidcBroker'; | ||
import { Spinner } from '../../components/Spinner'; | ||
import { UserManager } from 'oidc-client-ts'; | ||
|
||
const userManager: UserManager = new UserManager( | ||
OidcBroker.getUserManagerSettings() | ||
); | ||
const url = window.location.href; | ||
const isSilent = window.location.pathname.startsWith( | ||
'/redirect-from-oauth-silent' | ||
); | ||
|
||
if (isSilent) { | ||
userManager.signinSilentCallback(url); | ||
} else { | ||
userManager.signinPopupCallback(url); | ||
} | ||
|
||
const rootElement = document.getElementById('root'); | ||
const root = createRoot(rootElement!); | ||
root.render(<Spinner />); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.