https://supertokens.com/
Join Discord
Hey <@498057949541826571> I have intergrated user login using google, On frontend how I can get th...
l

Lucifer979

over 1 year ago
Hey @rp_st I have intergrated user login using google, On frontend how I can get the user information after login, like userId?
l
r
  • 2
  • 1
  • 32
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
Hi all, I'm working on 3-4 projects right now, and I want to create one account per project on super...
s

subscriptions_

almost 2 years ago
Hi all, I'm working on 3-4 projects right now, and I want to create one account per project on supertokens cloud, for some of them I won't go over free tier is this allowed to create multiple accounts by a single person?
s
r
  • 2
  • 4
  • 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
How can we allow multiple user roles to access a particular API? In case we want an API to be access...
n

namanchhabra_60978

about 2 years ago
How can we allow multiple user roles to access a particular API? In case we want an API to be accessed by SuperAdmin along with Admin, what needs to be added in the verify_session? @verify_session( # We add the UserRoleClaim's includes validator override_global_claim_validators=lambda global_validators, session, user_context: global_validators + \ [UserRoleClaim.validators.includes("admin")] )
n
r
  • 2
  • 1
  • 32
Hey all, is there a recommended process for debugging "Something went wrong. Please try again." on t...
m

mfwgenerics

about 2 years ago
Hey all, is there a recommended process for debugging "Something went wrong. Please try again." on the login screen? Been getting this one recently - can't see what code change might have caused it. No error or logs in either client or server console. Network tab shows one successful request to "api/auth/authorisationalurl" and nothing else UPDATE: It was a compatibility issue somewhere between
supertokens-auth-react
,
supertokens-node
and
supertokens-web-js
. This is not the first time I've been stung and I'm wondering what might be involved in a more usable compatibility table - I'd be open to building an open source compatibility calculator if there is a need for it
m
r
  • 2
  • 1
  • 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
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
Previous394041Next

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