Skip to content

Instantly share code, notes, and snippets.

View dwilhel1's full-sized avatar
⛰️
‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‎‏‏‎ ‎‏‏‎ ‎🏍️💨‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎ ‎‏‏‎ ‎‏‏‎ ‎🌅

Douglas Wilhelm dwilhel1

⛰️
‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‎‏‏‎ ‎‏‏‎ ‎🏍️💨‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎ ‎‏‏‎ ‎‏‏‎ ‎🌅
  • VillageMD
  • Kansas City, MO
View GitHub Profile
@dwilhel1
dwilhel1 / Hi Daniel.ts
Created February 21, 2023 22:31
Hi Daniel
const test = {
hi: 1,
};
@dwilhel1
dwilhel1 / authGuard.js
Created January 3, 2020 16:15
Example workaround for auth0's authGuard with Cypress
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) {
@dwilhel1
dwilhel1 / login.spec.js
Last active January 3, 2020 15:59
Example test for auth0 with Cypress
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',
};