-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SDK-1179] Support for rotating refresh tokens (#315)
* Refactored getting token using iframe into its own method * Implemented getTokenUsingRefreshToken * Fixed up the playground page to support refresh tokens * Set offline_access scope during initialization * Added error condition for when a refresh token isn't stored or no cache exists * Removed specification of audience when calling token endpoint * Clarified docs on useRefreshTokens * Simplified usage of getUniqueScopes in index.ts * Fixed some playground syntax issues for IE11 * Playground now shows auth info on load if authenticated * Simplified integration tests * Added more integration tests around getting access tokens * Encoded the nonce value when building authorize URLs * Renamed encodeState to encode * Fixed broken integration test
- Loading branch information
Steve Hobbs
authored
Jan 8, 2020
1 parent
c1d5f19
commit 5ece8d2
Showing
11 changed files
with
810 additions
and
314 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -12,19 +12,36 @@ import { whenReady } from './utils'; | |
// | ||
// | ||
// -- This is a parent command -- | ||
|
||
Cypress.Commands.add('login', () => { | ||
cy.get('#login_redirect').click(); | ||
|
||
cy.get('.auth0-lock-input-username .auth0-lock-input') | ||
.clear() | ||
.type('[email protected]'); | ||
|
||
cy.get('.auth0-lock-input-password .auth0-lock-input') | ||
.clear() | ||
.type('1234'); | ||
cy.get('.auth0-lock-submit').click(); | ||
return whenReady().then(win => win.auth0.handleRedirectCallback()); | ||
|
||
return whenReady().then(() => { | ||
cy.get('#handle_redirect_callback').click(); | ||
return cy.wait(250); | ||
}); | ||
}); | ||
|
||
Cypress.Commands.add('handleRedirectCallback', () => { | ||
cy.get('#handle_redirect_callback').click(); | ||
return cy.wait(250); | ||
}); | ||
|
||
Cypress.Commands.add('logout', () => cy.get('[data-cy=logout]').click()); | ||
|
||
Cypress.Commands.add('toggleSwitch', name => | ||
cy.get(`[data-cy=switch-${name}]`).click() | ||
); | ||
|
||
Cypress.Commands.add('loginNoCallback', () => { | ||
cy.get('#login_redirect').click(); | ||
|
||
|
@@ -39,5 +56,6 @@ Cypress.Commands.add('loginNoCallback', () => { | |
|
||
Cypress.Commands.add('resetTests', () => { | ||
cy.visit('http://localhost:3000'); | ||
cy.get('#reset-config').click(); | ||
cy.get('#logout').click(); | ||
}); |
Oops, something went wrong.