-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds user_id prop handling which was accidentally removed
- Loading branch information
Showing
3 changed files
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ test('authWithURLCode() updates localStorage with the user details when the http | |
const simpleOTP = new SimpleOTP('mocksiteid') | ||
const mockPost = vi.spyOn(http, 'post') | ||
mockPost.mockImplementation(() => { | ||
return { data: { data: { email: '[email protected]', token: 'reallysecuretoken' } } } | ||
return { data: { data: { id: 'someid', email: '[email protected]', token: 'reallysecuretoken' } } } | ||
}) | ||
|
||
window.location = { search: '?simpleotp_code=reallysecurecode'} | ||
|
@@ -102,7 +102,7 @@ test('authWithURLCode() throws when the code is missing from the url params', as | |
const mockPost = vi.spyOn(http, 'post') | ||
simpleOTP.signOut() | ||
mockPost.mockImplementation(() => { | ||
return { data: { data: { email: '[email protected]', token: 'reallysecuretoken' } } } | ||
return { data: { data: { id: 'someid', email: '[email protected]', token: 'reallysecuretoken' } } } | ||
}) | ||
|
||
window.location = { search: '?not_a_simpleotp_code=reallysecurecode'} | ||
|
@@ -120,7 +120,7 @@ test('authWithURLCode() returns the error code in the response when the http cal | |
data: { | ||
code: 'invalid_auth_code', | ||
message: 'bad auth code', | ||
data: { email: '[email protected]', token: 'reallysecuretoken' } | ||
data: { id: 'someid', email: '[email protected]', token: 'reallysecuretoken' } | ||
} | ||
} | ||
} | ||
|
@@ -145,7 +145,7 @@ test('authWithURLCode() returns a networking error in the response when the http | |
data: { | ||
code: 'invalid_auth_code', | ||
message: 'bad auth code', | ||
data: { email: '[email protected]', token: 'reallysecuretoken' } | ||
data: { id: 'someid', email: '[email protected]', token: 'reallysecuretoken' } | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters