https://supertokens.com/
Join Discord
Getting 404 with supertoken auth apis in NESTJS
n

noraiz7658

over 3 years ago
Getting 404 with supertoken auth apis in NESTJS
n
r
  • 2
  • 27
  • 25
hello.<@498057949541826571> when resetting password, how can I detect if newPassword is the same as...
t

tomita0022

over 1 year ago
hello.@rp_st when resetting password, how can I detect if newPassword is the same as old one? supertokens server is selfhosted, and is seperated from api backend. the only receives when resetting password are just password and token.
t
r
  • 2
  • 42
  • 24
Hi Support, I would like to upgrade from Core v.4.9 to 9.0. (self-hosted postgresql) I get an erro...
m

mr.lurs

over 1 year ago
Hi Support, I would like to upgrade from Core v.4.9 to 9.0. (self-hosted postgresql) I get an error message about a foreign key constraint that does not exist. Is there a migration script I have to run, do I have to upgrade incrementally?
m
r
  • 2
  • 3
  • 24
Hey there, <@498057949541826571> I'm currently integrating social authentication (google) into my ...
a

ashutoshdeshmukh.22

over 1 year ago
Hey there, @rp_st I'm currently integrating social authentication (google) into my application via SuperTokens. I'm looking to retrieve additional user details such as first name, last name, and gender from the social authentication process. However, it seems that these details are not being populated in the user data. as these are basic user details that must provided by google or any other social auth. Could you please let me know if there's any extra configuration required in the SuperTokens config to fetch these details, or if it's outside the scope of SuperTokens?
a
r
s
  • 3
  • 51
  • 24
Hello, I am trying to break my overrides out to be more modular, but I am having trouble typing them...
b

bolg55

almost 2 years ago
Hello, I am trying to break my overrides out to be more modular, but I am having trouble typing them.
ts
import { db } from '@db/index';
import { users, profiles } from '@db/schema';

const thirdPartySignInUpOverride =
  (originalImplementation) => async (input) => {
    let response = await originalImplementation.thirdPartySignInUp(input);

    if (response.status === 'OK') {
      let { id, emails } = response.user;
      console.log('USER SIGNED UP', id);
      await db.transaction(async (trx) => {
        await trx.insert(users).values({
          id,
          email: emails[0],
        });
        await trx.insert(profiles).values({
          userId: id,
        });
      });

      // This is the response from the OAuth 2 provider that contains their tokens or user info.
      let providerAccessToken = response.oAuthTokens['access_token'];
      let firstName =
        response.rawUserInfoFromProvider.fromUserInfoAPI!['first_name'];

      if (
        response.createdNewRecipeUser &&
        response.user.loginMethods.length === 1
      ) {
        // TODO: Post sign up logic
      } else {
        // TODO: Post sign in logic
      }
    }
    return response;
  };

export default thirdPartySignInUpOverride;
I am really not sure of what the
originalImplementation
type should be. I have tried creating an interface from ThirdPartyPasswordless recipe, but that didn't work at all. Any ideas? Edit: Found a way to type using RecipeInterface. Not sure if this is documented? I had to search in discord and got lucky
b
r
  • 2
  • 1
  • 24
Hi, is the types for the default translations from the recipes in supertokens-auth-react exported?
u

.algor1thm

almost 2 years ago
Hi, is the types for the default translations from the recipes in supertokens-auth-react exported?
u
r
  • 2
  • 5
  • 24
Hi, I have downloaded and installed npx create-supertokens-app@latest which is working ok when i'm u...
j

joey_15135

almost 2 years ago
Hi, I have downloaded and installed npx create-supertokens-app@latest which is working ok when i'm using connectionURI: "https://try.supertokens.com" how ever to do some further testing I have also installed supertokens core locally using this guide https://supertokens.com/docs/session/quick-setup/core/without-docker which is also working ok (localhost:3567 is returning 'hello'). However, when i set the connectionURI:"http://localhost:3567" and try to do signup from the front end I'm getting an error "No SuperTokens core available to query"
j
r
  • 2
  • 2
  • 24
I am running NextJS with an Express API on a separate server. Is there a way for me to get the user ...
r

robottonyc

about 2 years ago
I am running NextJS with an Express API on a separate server. Is there a way for me to get the user session inside getServerSideProps in my NextJS application? I have tried following the NextJS specific directions for getServerSideProps but it always comes back unauthorized. Any advice? I'm thinking I need to use the SDK inside getServerSideProps which is fine but how do I get the user id or session id so I can check if they have a valid session? My goal is to redirect to a different page if the user is authenticated. My api is running on api.example.com and app on app.example.com on my localhost by adjusting my etc/hosts. I get a session on first page load after logging in, if I refresh the page then it fails with the UNAUTHORIZED error triggering an infinite refreshing loop.
r
r
  • 2
  • 37
  • 24
Hi, I’m using Mailjet as a mail platform and would like to send supertokens mails using the service....
d

dominikjohn.

about 2 years ago
Hi, I’m using Mailjet as a mail platform and would like to send supertokens mails using the service. In the SMTP docs, I can only finds fields for providing a username / password. However, Mailjet only provides me with an API key and secret for the SMTP instead of credentials. Is there a way to configure Mailjet for use with Supertokens anyway?
d
r
  • 2
  • 1
  • 24
<@498057949541826571> is it possible to delete all users and their data programmatically.
a

aV

over 2 years ago
@rp_st is it possible to delete all users and their data programmatically.
a
r
d
  • 3
  • 17
  • 24
Previous525354Next

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