0

I am trying to experiment with MongoDB and MongoDB Stitch for mobile applications.

I want to have user authentication and store a few details in MongoDB Atlas. Having a look at the documentations there is information about Custom User Data: https://docs.mongodb.com/stitch/users/configure-custom-user-data/ but I do not see any examples for Android/iOS.

I have also managed to make a Trigger as suggested in different threads and here: https://www.mongodb.com/blog/post/reacting-to-auth-events-using-stitch-triggers But these auth triggers get data from Google/Facebook profiles and not Email/Password.

uniQ
  • 115
  • 2
  • 16
  • Did you enable email/password in the providers section? Also, to fetch the custom data, you need to use functions and that's in JS not iOS or Android specific. – Fatimah Dec 20 '19 at 22:44
  • Yes, email/password authentication is on, I can create and login accounts. But wanted to know how I could username + extra data (firstname etc) to mongo atlas – uniQ Dec 23 '19 at 10:18
  • It's right there in the documentation. To setup auth triggers for email/password, the right provider is local-userpass, is that what you are using? Documentation for auth trigger: https://docs.mongodb.com/stitch/triggers/authentication-triggers/ If that's properly setup, what's the other issue? Can you outline what you did? Step by step. Thanks – Fatimah Dec 23 '19 at 18:29
  • I can create the authentication trigger and they work, but I want to in my trigger send additional data such as FirstName and LastName. With email/pass the only data is email+pass – uniQ Dec 28 '19 at 16:20
  • According to the docs, you need to set up a collection in Atlas for your custom data and then associate that collection with custom user data in Stitch. Have you done that? – majorobot Dec 31 '19 at 18:23

0 Answers0