0

I want to configure a Mongo Stitch App to confirm users via e-mail. I'd like to use a deep link to link directly into my react native expo app. During development the link would be "exp://localhost:19000/". The link correctly reaches my app.

Unfortunately Stitch under "Auth Providers > Edit local-userpass" does not accept this link. The error message is:

"Please enter a URL beginning with a valid scheme such as https:// or http://"

To replicate this error:

  1. Setup a stitch app as described in the docs: https://www.mongodb.com/cloud/stitch

  2. In the stitch settings under "Users > Providers" enable "Email/Password" and go into the config settings for this authorization method. There, choose "Send a confirmation email".

  3. You are now prompted to configure a "Email Confirmation URL". Apparently this can not be a deep link to an expo app. The link needs to start with http or https but expo deep links start with "epx" as outlined here https://docs.expo.io/versions/latest/workflow/linking/#linking-module.

Any help would be greatly appreciated!

  • You should provide more details and show your codebase that will give a more clear idea about your issue and what the configuration parameters you have set. – Dipak Apr 18 '20 at 17:39
  • The issue is not related to my specific code. The question is if it is possible to use deep links in general. According to the documentation it should work (docs.mongodb.com/stitch/authentication/userpass/index.html). I added the exact steps to replicate this. I think it is a configuration issue, not a coding issue. – sparsespeculator Apr 19 '20 at 17:12

1 Answers1

0

Currently the only URL schemes supported for Email Confirmation URL is http and https.

However, you can create a custom flow using Run A Confirmation Function. Whenever a new user registers an account, the custom confirmation function will be executed with the tokens. The function could send an email containing a deep link and set the registration status to pending.

Then the client application must call the confirmUser SDK function to fully confirm the user’s identity and allow login. For an example of user confirmation, see Confirm a New User’s Email Address.

Wan B.
  • 18,367
  • 4
  • 54
  • 71