mongodb-stitch

How to use MongoDB Stitch Auth in isomorphic or SSR app?

对着背影说爱祢 提交于 2019-12-04 18:09:35
Would like to use Stitch in a NextJS app (basically isomorphic react). Normally, you would be able to pass a JWT or session token in the headers of the initial request, and if the user already has a session you can immediately load all of their data and hydrate the app on the server. With Google Firebase Auth you can even do this by passing a token in the request and collecting the user on the server side using that token. I'm not sure how this would work with Stitch, though. Documentation says Stitch creates a token that's stored in local storage. Is there anyway to pass this to the server to

How to get metadata out of AWS Cognito JWT to use it for the MongoDB Stitch Metadata Fields?

吃可爱长大的小学妹 提交于 2019-12-01 22:02:22
问题 I am using AWS Cognito as the custom authentication for my MongoDB Stitch app. I can successfully retrieve the JWT from AWS Cognito and login to MongoDB Stitch. I would like to store attributes in the JWT. I need help on how to get the JWT path to the metadata to put in MongoDB's Users -> Providers -> Metadata Fields. 来源: https://stackoverflow.com/questions/55667558/how-to-get-metadata-out-of-aws-cognito-jwt-to-use-it-for-the-mongodb-stitch-meta