Modifications made to support Browser Extension SSO (#605)
* Update feature/sso jslib261a200
-> 2e823ea (#589) * [SSO] Reset master password (#580) * Initial commit reset master password (sso) * Reverted order of two factor/reset password conditional * Added necessary resetMasterPassword flag for potential entry into RMP flow * Complete Revamp: Reverted Register // Deleted reset-master-password // updated sso/(settings)change password to use use super class // Adjust routing/messages // Created (accounts) change-password * Updated button -> Set Master Password * Refactored change password sub classes to use new submit pattern * Cleaned import statements * Update jslib (7fa5178
->fe167be
) * Update jslibfe167be
- >34632e5 * Fixed sso base class import * merge master * Fixed missing semicolon // updated jslib to whats in feature/sso * Fixed two factor formatting * Added new change password component to app module * Updated component selector * updating jslib 34632e5 -> 2e823ea * Fixed lint warning in two-factor component Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com> * Update jslib to101c568
(#594) * Support for dynamic clientid (#595) * support third party sso clients * jslib update * update jslib * Modifications made for Browser Extension SSO * Brought web specific ssocomponent into module * Removed sso complete transition * Fixed remaining merge issues * Removed un-needed block of code. * Moved processing to sso-connector. * Removed unused import * Fixed curly braces.. * Linter fixes * Aligned verbiage for process message handler * Lintr fixes * Firefox can't handle closing the window this way. * Update sso.ts Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com> Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
This commit is contained in:
parent
abfd1fa254
commit
b2685d455b
|
@ -4,7 +4,12 @@ require('./sso.scss');
|
|||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
const code = getQsParam('code');
|
||||
const state = getQsParam('state');
|
||||
|
||||
if (state != null && state.endsWith(':clientId=browser')) {
|
||||
initiateBrowserSso(code, state);
|
||||
} else {
|
||||
window.location.href = window.location.origin + '/#/sso?code=' + code + '&state=' + state;
|
||||
}
|
||||
});
|
||||
|
||||
function getQsParam(name: string) {
|
||||
|
@ -22,3 +27,7 @@ function getQsParam(name: string) {
|
|||
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
}
|
||||
|
||||
function initiateBrowserSso(code: string, state: string) {
|
||||
window.postMessage({ command: 'authResult', code: code, state: state }, '*');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue