https://supertokens.com/
Join Discord
Hello. If I create a instance of axios, supertoken is not detecting session cookies. I am using supe...
s

soumya0373

over 1 year ago
Hello. If I create a instance of axios, supertoken is not detecting session cookies. I am using supertokens-web-js in nuxt.js 2 // Here is my code plugins/axios-cache-setup.js
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)
}
s
r
  • 2
  • 14
  • 32
I want to override the SessionAuth's behaviour of checking if the session is present or not and if n...
s

Sekai

over 1 year ago
I want to override the SessionAuth's behaviour of checking if the session is present or not and if not redirect to login page. I know I need to modify the overrideGlobalClaimValidators field but I am having troubles finding documentation on it. I don't know what exactly to put. All I know is the authorization part where it checks the roles.
s
r
  • 2
  • 6
  • 32
Hey everyone, I'm facing an issue with my Express backend setup along with Supertokens for session ...
s

sammon2412

almost 2 years ago
Hey everyone, I'm facing an issue with my Express backend setup along with Supertokens for session management. Here's a snippet of my backend code:
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();
    //....
});
I've added
verifySession()
to ensure that only authenticated users can access the
/like-comment
route. However, I'm having trouble accessing this route from the front-end using Axios. I've wrapped my component inside
SessionAuth
so that logged-in users have access, but I keep receiving a 401 error. Could anyone guide me on how to properly access this route from the front-end using Axios and ensure that the user is authenticated? Thanks in advance!
s
r
  • 2
  • 38
  • 32
I have supertokens core behind nginx reverse proxy. I'm forwarding these headers: proxy_set_header...
n

nik2208

about 2 years ago
I have supertokens core behind nginx reverse proxy. I'm forwarding these headers: proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; I get "hello" only if i remove the Host header. So I'm wondering how to bind the core instance with the A/AAAA assigned record. In the attached docs I found SUPERTOKENS_HOST but it doesnt seem to have effect on the reverse proxy, still getting HTTP Status 400 – Bad Request when forwarding the host. this is my config.yaml core_config_version: 0 host: "0.0.0.0" supertokens_host: "https://supertokens.example.com"
n
r
  • 2
  • 15
  • 32
Hi, i'm having an issue in flutter while migrating sessions from firebase auth, the migration works ...
j

jeffaknine

over 2 years ago
Hi, i'm having an issue in flutter while migrating sessions from firebase auth, the migration works fine, the new session cookie is set, but when navigating to the next page and making an API call,
SuperTokens.getAccessToken()
returns null. Any ideas on why the session would be lost ?
j
r
  • 2
  • 56
  • 32
What's the best way to debug why a user can't log in after getting the SMS code with passwordless? (...
w

wrnbrd

over 2 years ago
What's the best way to debug why a user can't log in after getting the SMS code with passwordless? (Once they enter the code, it says "Error" even though they are a user)
w
r
  • 2
  • 41
  • 32
Hi there, I am thinking about using supertokens for our intenal admin app. We don't want to allow ou...
j

jamalm8656

over 2 years ago
Hi there, I am thinking about using supertokens for our intenal admin app. We don't want to allow our users to signup, but want to create users through the user management dashboard. Is that supported?
j
n
  • 2
  • 5
  • 32
Is there a management background for ordinary users, such as users can change passwords, modify emai...
c

candice07251

over 2 years ago
Is there a management background for ordinary users, such as users can change passwords, modify email?
c
r
  • 2
  • 7
  • 32
Auth Redirection - is there a version of this that I can use for supertokens-web-js? Also have the s...
k

Kranos

over 2 years ago
Auth Redirection - is there a version of this that I can use for supertokens-web-js? Also have the same question for setting
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;
            }
        }),
    ]
});
k
r
  • 2
  • 1
  • 32
I want to use supertokens with AWS API gateway+lambda functions I tried following the recipe https...
s

saurabh_works

about 3 years ago
I want to use supertokens with AWS API gateway+lambda functions I tried following the recipe https://supertokens.com/docs/emailpassword/serverless/with-aws-lambda/backend-config for the backend config, the tutorial says " Create a config.js file in the root directory of your project. " All I have are bunch of lambda functions called from API gateway. Where do I create these files? 🤔
s
r
  • 2
  • 20
  • 32
Previous383940Next

SuperTokens.com

SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).

Powered by