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) }
Sekai
sammon2412
javascript import express from "express"; import { verifySession } from "supertokens-node/recipe/session/framework/express"; import { SessionRequest } from "supertokens-node/framework/express"; let app = express(); app.post("/like-comment", verifySession(), (req: SessionRequest, res) => { let userId = req.session!.getUserId(); //.... });
verifySession()
/like-comment
SessionAuth
nik2208
jeffaknine
SuperTokens.getAccessToken()
wrnbrd
jamalm8656
candice07251
Kranos
useShadowDom: false
import SuperTokens from "supertokens-auth-react"; import ThirdPartyEmailPassword from "supertokens-auth-react/recipe/thirdpartyemailpassword"; SuperTokens.init({ appInfo: { apiDomain: "...", appName: "...", websiteDomain: "...", }, recipeList: [ ThirdPartyEmailPassword.init({ getRedirectionURL: async (context) => { if (context.action === "SUCCESS") { if (context.redirectToPath !== undefined) { // we are navigating back to where the user was before they authenticated return context.redirectToPath; } return "/dashboard"; } return undefined; } }), ] });
saurabh_works
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).