File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -1545,6 +1545,21 @@ export default class ClientStore extends BaseStore {
1545
1545
if ( search ) {
1546
1546
if ( window . location . pathname !== routes . callback_page ) {
1547
1547
if ( code_param && action_param ) this . setVerificationCode ( code_param , action_param ) ;
1548
+ // NOTE: Remove this logic once social signup is intergated with OIDC
1549
+ const params = new URLSearchParams ( window . location . search ) ;
1550
+ const isUsingLegacyFlow = params . has ( 'token1' ) && params . has ( 'acct1' ) ;
1551
+ const loggedState = Cookies . get ( 'logged_state' ) ;
1552
+
1553
+ if ( isUsingLegacyFlow && loggedState === 'false' ) {
1554
+ const currentDomain = window . location . hostname . split ( '.' ) . slice ( - 2 ) . join ( '.' ) ;
1555
+ Cookies . set ( 'logged_state' , 'true' , {
1556
+ expires : 30 ,
1557
+ path : '/' ,
1558
+ domain : currentDomain ,
1559
+ secure : true ,
1560
+ } ) ;
1561
+ }
1562
+
1548
1563
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
1549
1564
setTimeout ( ( ) => {
1550
1565
// timeout is needed to get the token (code) from the URL before we hide it from the URL
Original file line number Diff line number Diff line change @@ -33,13 +33,6 @@ const useSilentLoginAndLogout = ({
33
33
const params = new URLSearchParams ( window . location . search ) ;
34
34
const isUsingLegacyFlow = params . has ( 'token1' ) && params . has ( 'acct1' ) ;
35
35
if ( isUsingLegacyFlow && loggedState === 'false' && isOAuth2Enabled ) {
36
- const currentDomain = window . location . hostname . split ( '.' ) . slice ( - 2 ) . join ( '.' ) ;
37
- Cookies . set ( 'logged_state' , 'true' , {
38
- expires : 30 ,
39
- path : '/' ,
40
- domain : currentDomain ,
41
- secure : true ,
42
- } ) ;
43
36
return ;
44
37
}
45
38
You can’t perform that action at this time.
0 commit comments