Skip to content

Commit

Permalink
chore: remove old changes for oidc social logic (#17995)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienne-deriv authored Jan 17, 2025
1 parent f9a118c commit 5f63d99
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions packages/core/src/Stores/client-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -1529,20 +1529,6 @@ export default class ClientStore extends BaseStore {
if (search) {
if (window.location.pathname !== routes.callback_page) {
if (code_param && action_param) this.setVerificationCode(code_param, action_param);
// NOTE: Remove this logic once social signup is intergated with OIDC
const params = new URLSearchParams(window.location.search);
const isUsingLegacyFlow = params.has('token1') && params.has('acct1');
const loggedState = Cookies.get('logged_state');

if (isUsingLegacyFlow && loggedState === 'false') {
const currentDomain = window.location.hostname.split('.').slice(-2).join('.');
Cookies.set('logged_state', 'true', {
expires: 30,
path: '/',
domain: currentDomain,
secure: true,
});
}

document.addEventListener('DOMContentLoaded', () => {
setTimeout(() => {
Expand Down Expand Up @@ -2240,6 +2226,18 @@ export default class ClientStore extends BaseStore {
if (is_account_param) {
obj_params[key] = value;
is_social_signup_provider = true;
// NOTE: Remove this logic once social signup is intergated with OIDC
const loggedState = Cookies.get('logged_state');
console.log('setting logged state to false if cookies are false');
if (loggedState === 'false') {
const currentDomain = window.location.hostname.split('.').slice(-2).join('.');
Cookies.set('logged_state', 'true', {
expires: 30,
path: '/',
domain: currentDomain,
secure: true,
});
}
}
});

Expand Down

0 comments on commit 5f63d99

Please sign in to comment.