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
const test = { | |
hi: 1, | |
}; |
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
import { getInstance } from './index'; | |
// eslint-disable-next-line consistent-return | |
export const authGuard = (to, from, next) => { | |
const authService = getInstance(); | |
// eslint-disable-next-line consistent-return | |
const fn = () => { | |
// If the user is authenticated, continue with the route | |
if (authService.isAuthenticated) { |
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
describe('Authentication with auth0', () => { | |
it('should successfully login to our app', () => { | |
cy.login() | |
.then(resp => resp.body) | |
.then((body) => { | |
const { access_token, expires_in, id_token } = body; | |
const auth0State = { | |
nonce: '', | |
state: 'some-random-state', | |
}; |