https://supertokens.com/ logo
validation against dashboard user
a

ADRNSTFFN

05/07/2023, 8:41 PM
I want to reuse the credentials for my User Management Dashboard for another Admin Dashboard in my App. Is there a method that is exposed that I can use to validate against the dashboard user from my node backend?
r

rp

05/08/2023, 5:55 AM
hey @ADRNSTFFN - @nkshah2 can help here
n

nkshah2

05/08/2023, 5:59 AM
Hey @ADRNSTFFN , Just so I understand correctly, you want to create a user dashboard credential and then also use the same credential to log in to the admin app? Or the other way around?
a

ADRNSTFFN

05/08/2023, 8:43 AM
Hey 🙂 I have already created the Supertokens dashboard user with the curl command. I want to use that user (/his credentials) to authenticate with my other admin app. The Admin app has me implement an "autenticate" method that gets credentials from the admin dashboard at login and returns true/false. I now want to call on Supertokens inside this method to check if the credentials provided match with the already created dashboard user.
n

nkshah2

05/08/2023, 9:20 AM
Right so the backend SDK does not expose a function for this but you can query the core directly yourself and implement it that way. You can refer to the API spec for the sign in API exposed by the SuperTokens core here: https://app.swaggerhub.com/apis/supertokens/CDI/2.20.0#/Dashboard%20Recipe/signInDashboardUser
a

ADRNSTFFN

05/10/2023, 7:51 PM
Thanks a lot, the documentation is actually really helpful! I got it working in like 10 lines of code 🙂
n

nkshah2

05/11/2023, 2:00 AM
Happy to help