@@ -38,7 +38,7 @@ describe('core/action_code_url', () => {
38
38
'continueUrl=' +
39
39
encodeURIComponent ( continueUrl ) +
40
40
'&languageCode=en&tenantId=TENANT_ID&state=bla' ;
41
- const actionCodeUrl = ActionCodeURL . _fromLink ( auth , actionLink ) ;
41
+ const actionCodeUrl = ActionCodeURL . parseLink ( auth , actionLink ) ;
42
42
expect ( actionCodeUrl ! . operation ) . to . eq ( Operation . EMAIL_SIGNIN ) ;
43
43
expect ( actionCodeUrl ! . code ) . to . eq ( 'CODE' ) ;
44
44
expect ( actionCodeUrl ! . apiKey ) . to . eq ( 'API_KEY' ) ;
@@ -54,7 +54,7 @@ describe('core/action_code_url', () => {
54
54
'https://www.example.com/finishSignIn?' +
55
55
'oobCode=CODE&mode=signIn&apiKey=API_KEY&' +
56
56
'languageCode=en' ;
57
- const actionCodeUrl = ActionCodeURL . _fromLink ( auth , actionLink ) ;
57
+ const actionCodeUrl = ActionCodeURL . parseLink ( auth , actionLink ) ;
58
58
expect ( actionCodeUrl ! . operation ) . to . eq ( Operation . EMAIL_SIGNIN ) ;
59
59
} ) ;
60
60
@@ -63,7 +63,7 @@ describe('core/action_code_url', () => {
63
63
'https://www.example.com/finishSignIn?' +
64
64
'oobCode=CODE&mode=verifyAndChangeEmail&apiKey=API_KEY&' +
65
65
'languageCode=en' ;
66
- const actionCodeUrl = ActionCodeURL . _fromLink ( auth , actionLink ) ;
66
+ const actionCodeUrl = ActionCodeURL . parseLink ( auth , actionLink ) ;
67
67
expect ( actionCodeUrl ! . operation ) . to . eq (
68
68
Operation . VERIFY_AND_CHANGE_EMAIL
69
69
) ;
@@ -74,7 +74,7 @@ describe('core/action_code_url', () => {
74
74
'https://www.example.com/finishSignIn?' +
75
75
'oobCode=CODE&mode=verifyEmail&apiKey=API_KEY&' +
76
76
'languageCode=en' ;
77
- const actionCodeUrl = ActionCodeURL . _fromLink ( auth , actionLink ) ;
77
+ const actionCodeUrl = ActionCodeURL . parseLink ( auth , actionLink ) ;
78
78
expect ( actionCodeUrl ! . operation ) . to . eq ( Operation . VERIFY_EMAIL ) ;
79
79
} ) ;
80
80
@@ -83,7 +83,7 @@ describe('core/action_code_url', () => {
83
83
'https://www.example.com/finishSignIn?' +
84
84
'oobCode=CODE&mode=recoverEmail&apiKey=API_KEY&' +
85
85
'languageCode=en' ;
86
- const actionCodeUrl = ActionCodeURL . _fromLink ( auth , actionLink ) ;
86
+ const actionCodeUrl = ActionCodeURL . parseLink ( auth , actionLink ) ;
87
87
expect ( actionCodeUrl ! . operation ) . to . eq ( Operation . RECOVER_EMAIL ) ;
88
88
} ) ;
89
89
@@ -92,7 +92,7 @@ describe('core/action_code_url', () => {
92
92
'https://www.example.com/finishSignIn?' +
93
93
'oobCode=CODE&mode=resetPassword&apiKey=API_KEY&' +
94
94
'languageCode=en' ;
95
- const actionCodeUrl = ActionCodeURL . _fromLink ( auth , actionLink ) ;
95
+ const actionCodeUrl = ActionCodeURL . parseLink ( auth , actionLink ) ;
96
96
expect ( actionCodeUrl ! . operation ) . to . eq ( Operation . PASSWORD_RESET ) ;
97
97
} ) ;
98
98
@@ -101,7 +101,7 @@ describe('core/action_code_url', () => {
101
101
'https://www.example.com/finishSignIn?' +
102
102
'oobCode=CODE&mode=revertSecondFactorAddition&apiKey=API_KEY&' +
103
103
'languageCode=en' ;
104
- const actionCodeUrl = ActionCodeURL . _fromLink ( auth , actionLink ) ;
104
+ const actionCodeUrl = ActionCodeURL . parseLink ( auth , actionLink ) ;
105
105
expect ( actionCodeUrl ! . operation ) . to . eq (
106
106
Operation . REVERT_SECOND_FACTOR_ADDITION
107
107
) ;
@@ -112,7 +112,7 @@ describe('core/action_code_url', () => {
112
112
const actionLink =
113
113
'https://www.example.com:8080/finishSignIn?' +
114
114
'oobCode=CODE&mode=signIn&apiKey=API_KEY&state=bla' ;
115
- const actionCodeUrl = ActionCodeURL . _fromLink ( auth , actionLink ) ;
115
+ const actionCodeUrl = ActionCodeURL . parseLink ( auth , actionLink ) ;
116
116
expect ( actionCodeUrl ! . operation ) . to . eq ( Operation . EMAIL_SIGNIN ) ;
117
117
expect ( actionCodeUrl ! . code ) . to . eq ( 'CODE' ) ;
118
118
expect ( actionCodeUrl ! . apiKey ) . to . eq ( 'API_KEY' ) ;
@@ -126,7 +126,7 @@ describe('core/action_code_url', () => {
126
126
'https://www.example.com/finishSignIn?' +
127
127
'oobCode=CODE1&mode=signIn&apiKey=API_KEY1&state=bla' +
128
128
'#oobCode=CODE2&mode=signIn&apiKey=API_KEY2&state=bla' ;
129
- const actionCodeUrl = ActionCodeURL . _fromLink ( auth , actionLink ) ;
129
+ const actionCodeUrl = ActionCodeURL . parseLink ( auth , actionLink ) ;
130
130
expect ( actionCodeUrl ! . operation ) . to . eq ( Operation . EMAIL_SIGNIN ) ;
131
131
expect ( actionCodeUrl ! . code ) . to . eq ( 'CODE1' ) ;
132
132
expect ( actionCodeUrl ! . apiKey ) . to . eq ( 'API_KEY1' ) ;
@@ -138,31 +138,31 @@ describe('core/action_code_url', () => {
138
138
context ( 'invalid links' , ( ) => {
139
139
it ( 'should handle missing API key, code & mode' , ( ) => {
140
140
const actionLink = 'https://www.example.com/finishSignIn' ;
141
- expect ( ActionCodeURL . _fromLink ( auth , actionLink ) ) . to . be . null ;
141
+ expect ( ActionCodeURL . parseLink ( auth , actionLink ) ) . to . be . null ;
142
142
} ) ;
143
143
144
144
it ( 'should handle invalid mode' , ( ) => {
145
145
const actionLink =
146
146
'https://www.example.com/finishSignIn?oobCode=CODE&mode=INVALID_MODE&apiKey=API_KEY' ;
147
- expect ( ActionCodeURL . _fromLink ( auth , actionLink ) ) . to . be . null ;
147
+ expect ( ActionCodeURL . parseLink ( auth , actionLink ) ) . to . be . null ;
148
148
} ) ;
149
149
150
150
it ( 'should handle missing code' , ( ) => {
151
151
const actionLink =
152
152
'https://www.example.com/finishSignIn?mode=signIn&apiKey=API_KEY' ;
153
- expect ( ActionCodeURL . _fromLink ( auth , actionLink ) ) . to . be . null ;
153
+ expect ( ActionCodeURL . parseLink ( auth , actionLink ) ) . to . be . null ;
154
154
} ) ;
155
155
156
156
it ( 'should handle missing API key' , ( ) => {
157
157
const actionLink =
158
158
'https://www.example.com/finishSignIn?oobCode=CODE&mode=signIn' ;
159
- expect ( ActionCodeURL . _fromLink ( auth , actionLink ) ) . to . be . null ;
159
+ expect ( ActionCodeURL . parseLink ( auth , actionLink ) ) . to . be . null ;
160
160
} ) ;
161
161
162
162
it ( 'should handle missing mode' , ( ) => {
163
163
const actionLink =
164
164
'https://www.example.com/finishSignIn?oobCode=CODE&apiKey=API_KEY' ;
165
- expect ( ActionCodeURL . _fromLink ( auth , actionLink ) ) . to . be . null ;
165
+ expect ( ActionCodeURL . parseLink ( auth , actionLink ) ) . to . be . null ;
166
166
} ) ;
167
167
} ) ;
168
168
} ) ;
0 commit comments