How to integrate SuperTokens with MongoDB Atlas Ap...
# support-questions-legacy
f
How to integrate SuperTokens with MongoDB Atlas App Service and Realm? Realm supports authentication via custom JWT as below
Copy code
// Create a custom jwt credential
const jwt = await authenticateWithExternalSystem();
const credentials = Realm.Credentials.jwt(jwt);
const user = await app.logIn(credentials);
Also, on the App Service's side, it supports few auth providers including Custom JWT provider that accepts a JWK URI. I'm thinking of configuring the App Service's Custom JWT provider to use
<domain>/auth/jwt/jwks.json
as the JWK URI and somehow get the jwt from the SuperTokens' Frontend SDK once user signs in/up and pass it to
Realm.Credentials.jwt(jwt)
. Does this sound doable? If yes, how to get the jwt from the SDK and how session refreshing works in this scenario?
5 Views