I'm working on an app where various various authentication workflows are provided to the user: one of them is user registration via email/password. So, when registering with email / password, an email verification link is sent to the user's email. When the user clicks this link to validate his email, the app should catch this link and perform the call to the backend. Any ideas on how this "catching" can be performed by the app ?
Asked
Active
Viewed 1,370 times
1 Answers
3
I have dealt with a similar workflow when developing Android apps in the past, and the way I handled it used something similar to the following:
- A new user registers via the app. This creates a new user record in a user database table on the backend. There is an "active" column which is initially set to false.
- The registration also generates a confirmation email message. The message contains an activation link, which itself contains some sort of UUID token as a GET parameter. This same token gets written to a column in the user table.
- Finally, the user opens the email, clicks the link, and that GET request activates the user account by setting the "active" column to true for that user. A successful activation also depends on the token being passed in being a match to what is written in the table.
Note that I am suggesting handling all of this completely outside of your Android app. If you don't have a backend to your Android app, and you plan on having any sort of user management, then consider creating one.
You may consider adding a link to the successful activation page which can then launch/return to your Android app. See here for more information.

Tim Biegeleisen
- 502,043
- 27
- 286
- 360
-
This is exactly the way it is handled by the backend team. But my issue is to know if there is a way to get back to the app (even if it's just the home screen...) ? – Claude Hangui Feb 11 '19 at 07:41
-
Well, the activation link could land on/return a webpage which then has a link which returns to your Android app. Would that possibly work for you? – Tim Biegeleisen Feb 11 '19 at 07:43
-
Actually I checked out with the web team (there's also a website) and indeed upon the user clicking the activation link from the mail, the GET request you mentioned which activates the account returns a webpage informing the user he has successfully activated his account. So this "link" you're talking about has to be done on the website, because I still can't figure out how I'll get back to my app. – Claude Hangui Feb 11 '19 at 07:50
-
@ClaudeHangui Yes, it would be generated on the server, but my point is that it seems there is a way to have an embedded link which would switch to your app. So there may be a way to do what you want hereY – Tim Biegeleisen Feb 11 '19 at 07:56