der_suchende
majskiy
thirdPartySignInAndUp
d3adb0y
verify_session
jj_9475
cg.vols
fragordie
ts @Injectable() export class GQLAuthGuard implements CanActivate { async canActivate(context: ExecutionContext): Promise<boolean> { const ctx = GqlExecutionContext.create(context).getContext(); let err = undefined; // You can create an optional version of this by passing {sessionRequired: false} to verifySession await verifySession({ sessionRequired: false })( ctx.req, ctx.res, (res) => { err = res; }, ); if (ctx.res.headersSent) { throw new STError({ message: 'RESPONSE_SENT', type: 'RESPONSE_SENT', }); } if (err) { throw err; } return true; } }
cpalta8102
soumya0373
import axios from 'axios' import { setupCache } from 'axios-cache-interceptor/dev' export default function ({ $config }, inject) { // Create axios instance const axiosInstance = axios.create({ baseURL: $config.baseURL, }) // Set up caching // Set axios instance to Nuxt context const axiosWithCache = setupCache(axiosInstance, { methods: ['get', 'post'], debug: console.log, }) inject('axiosCache', axiosWithCache) }
abyssalhaze
michael_pxr
pages/auth/[[...path]].tsx
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).