You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For anyone coming here, here's an updated version which uses SPA SDK itself to perform the flow.
A static config file is assumed, but can be adapted to use env variables.
Care as it uses deep import to get many types which aren't exposed.
Head here it you want the TS + Vue3 compatible version of Auth0 wrapper for Vue.
// cypress/support/auth0-helpers.tsimport{TokenEndpointResponseasAuth0TokenEndpointResponse}from'@auth0/auth0-spa-js/dist/typings/api';import{ICache}from'@auth0/auth0-spa-js/dist/typings/cache';importtype{verify}from'@auth0/auth0-spa-js/dist/typings/jwt';import{Ref}from'@vue/composition-api';import{Auth0Instance}from'src/composables/auth0/instance';// These methods are private, we are forced to use them to comply to SPA SDK flowinterfaceAuth0ClientPrivateMethods{_verifyIdToken(id_token: string): ReturnType<typeofverify>;cache: ICache;}exportinterfaceTokenEndpointResponseextendsAuth0TokenEndpointResponse{token_type: string;}exportconstuseAuth0=()=>cy.window().its('Auth0')asCypress.Chainable<Auth0Instance&{auth0Client: Ref<Auth0ClientPrivateMethods>}>;
// cypress/support/types.d.ts// Must be put in its own file because ES6 imports into 'commands.ts' prevents TS from discovering the augmentation// eslint-disable-next-line @typescript-eslint/no-namespace, @typescript-eslint/no-unused-varsdeclarenamespaceCypress{interfaceChainable{/** * Custom command to login using Auth0 provider. * @example cy.login() */login(): void;}}
The text was updated successfully, but these errors were encountered:
For anyone coming here, here's an updated version which uses SPA SDK itself to perform the flow.
A static config file is assumed, but can be adapted to use env variables.
Care as it uses deep import to get many types which aren't exposed.
Head here it you want the TS + Vue3 compatible version of Auth0 wrapper for Vue.
The text was updated successfully, but these errors were encountered: