https://supertokens.com/
Join Discord
how we can set the cookie for all our domains
g

gwenael1249

over 2 years ago
how we can set the cookie for all our domains
g
n
r
  • 3
  • 15
  • 6
Hey 👋 I am trying to implement multi tenancy (for our cloud implementation; single instance for a...
n

n1ru4l

over 2 years ago
Hey 👋 I am trying to implement multi tenancy (for our cloud implementation; single instance for all customers). This is the implementation I have in mind: 1. An organisation entity is linked to an OpenID Connect provider 2. A link is generated for logging in via a specific OpenID Connect provider (
https://example.com/auth/org?id=oidc_provider_id
) 3. People visiting this link start the OAuth2 OIDC login flow with the organization specific OIDC provider 4. Users that newly register/log in are automatically added to the specific organization I am now trying to figure out how to handle this on the SuperTokens Next.js side. Within the
getServerSideProps
function of the
auth
route I can load the specific integration (id, secret and issuer url) from the database. However, it is unclear to me on how I would then utilize this information with the SuperTokens SDK (since it is a singleton that is initialized once and cannot be initialised per request 🤔 . Do you have any pointers here?
n
r
n
  • 3
  • 75
  • 6
Is there a simple way to change the reset password url? The only thing I really want to change is th...
i

ITEnthusiasm

over 2 years ago
Is there a simple way to change the reset password url? The only thing I really want to change is the
path
(from
/auth/reset-password
to
/reset-password
). Is that simple to do without messing anything up? 😅 It seems
getResetPasswordUrl
is deprecated.
i
r
l
  • 3
  • 18
  • 6
Hey guys, is there a way for mobile apps to log in users with some on-device authentication mechanis...
e

execreate

over 2 years ago
Hey guys, is there a way for mobile apps to log in users with some on-device authentication mechanism (FaceID / Fingerprint) with Supertokens?
e
r
  • 2
  • 13
  • 6
Hi <@498057949541826571>, can i override default supertokens self-hosted port? by default it is 3567...
i

IaS1506

over 2 years ago
Hi @rp_st, can i override default supertokens self-hosted port? by default it is 3567, but i want 4000 for example(bc i have different instances of supertokens)
i
r
  • 2
  • 36
  • 6
Hi guys, I'm using supertokens to authenticate a Google Sheets Add On using Google as Third Party Pr...
g

ggi_d

over 2 years ago
Hi guys, I'm using supertokens to authenticate a Google Sheets Add On using Google as Third Party Provider. I am unable to get through a CORS Issue which wasn't there before in the application. Only the sign-in api is failing with CORS error. Any help on this?
g
n
r
  • 3
  • 77
  • 6
Hi, I got a problem with apple login. Just to clarify my code with apple login works on a one enviro...
d

Diesel

almost 3 years ago
Hi, I got a problem with apple login. Just to clarify my code with apple login works on a one environment with a set of client-id, key-id and client-secret but on another environment with a different set of client-id, key-id and client-secret the same code fails and i try to understand why maybe you will have some info to share. Im using Go as my backend. The sign in with apple id seems to work but when im redirected it fails in the backend on
signinup
api with a panic error of
interface conversion: interface {} is nil, not string
I've attached the logs to the message, they are supertokens logs mix with some of my app. My guess is it could be my configuration is wrong but i dont see any problem with it.
log-panic-apple
d
r
s
  • 3
  • 43
  • 6
Hi, What is the best way to achive a "stay logged in" for a long time? I dont want the users of my m...
l

Luca

almost 3 years ago
Hi, What is the best way to achive a "stay logged in" for a long time? I dont want the users of my mobile app to login again event if they hadn't used the app for some weeks
l
r
  • 2
  • 21
  • 6
Hey, I realized the auth cookie isn't sent on mobile browser (tested on ios Chrome & Safari) so I ge...
i

idanh.

almost 3 years ago
Hey, I realized the auth cookie isn't sent on mobile browser (tested on ios Chrome & Safari) so I get
refreshSession: UNAUTHORISED because idRefreshToken from cookies is undefined
is there any workaround? i'm working on a responsive PWA with nestjs + graphql + React
i
r
  • 2
  • 22
  • 6
Hi there. I'm trying to implement auth with multiple custom providers. I have the following code...
g

giorgosera

almost 3 years ago
Hi there. I'm trying to implement auth with multiple custom providers. I have the following code to create a list of providers based on a configuration file
javascript
const providers = connections.map(({ id, authUrl, tokenUrl, clientId, clientSecret, scopes }) => {
  return {
    id,
    get: (redirectURI: undefined | string, authCodeFromRequest: undefined | string) => {
      return {
        accessTokenAPI: {
          url: tokenUrl,
          params: {
            client_id: clientId,
            client_secret: clientSecret,
            grant_type: "authorization_code",
            redirect_uri: process.env.AUTH_SUCCESS_REDIRECT_URI,
            code: authCodeFromRequest || '',
          }
        },
        authorisationRedirect: {
          url: authUrl,
          params: {
            client_id: clientId,
            scope: scopes,
            response_type: "code",
            redirect_uri: process.env.AUTH_SUCCESS_REDIRECT_URI,
          }
        },
        getClientId: () => clientId,
        getProfileInfo: async (accessTokenAPIResponse: any) => {
          console.log(accessTokenAPIResponse);
          return {
              id: "...",
          };
        }
      }
    }    

  }
});
I can successfully login with a provider and I can see I can get redirected to the
process.env.AUTH_SUCCESS_REDIRECT_URI
. But the code inside
getProfileInfo
is never called. Also, I have followed the guide (https://supertokens.com/docs/thirdparty/common-customizations/getting-provider-access-token) to get the provider access token but that doesn't get called either. What am I doing wrong?
g
r
  • 2
  • 78
  • 6
Previous818283Next

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