feat: allow embedded experience to open register page for authenticated users (#945)

VAN-1482
This commit is contained in:
Syed Sajjad Hussain Shah
2023-06-15 14:42:09 +05:00
committed by GitHub
parent 2a2c5abc81
commit d41c06b1fd
6 changed files with 83 additions and 20 deletions

View File

@@ -1,7 +1,7 @@
// Utility functions
import * as QueryString from 'query-string';
import { AUTH_PARAMS } from '../constants';
import { AUTH_PARAMS, EMBEDDED } from '../constants';
export const getTpaProvider = (tpaHintProvider, primaryProviders, secondaryProviders) => {
let tpaProvider = null;
@@ -76,3 +76,8 @@ export const windowScrollTo = (options) => {
return window.scrollTo(options.top, options.left);
};
export const isRegistrationEmbedded = () => {
const queryParams = getAllPossibleQueryParams();
return queryParams?.variant === EMBEDDED;
};