Customising authentication redirects
Last updated
Was this helpful?
After the end-user completes the authentication flow, they will be redirected to a default final url that's either a success or failure screen before they go back to your app.
These urls can be customized when you're calling one of the /auth endpoints.
When the user authenticates a health account (e.g. Oura), before they go back to your app, they see a final URL (screen) of the authentication flow is either a success or failure screen.


The final url will append the following parameters:
user_id (not Null)
resource (not Null)
reference_id (can be Null - if you did not pass it in the auth endpoint).
Terra provides these urls by default, and they can also be customized in the /auth endpoints. They can be specified in the body of the authentication request as:
auth_success_redirect_url
auth_failure_redirect_url
You can redirect to a:
Web Page: A specific page on your web application, including any useful query parameters.
Example: https://somereallycoolcompany.com?terra_auth_success=true
Deep Link: A deep link into your mobile application.
Example: reallycoolapp://success
When using the widget, when the user selects one of the Mobile SDK-based integrations (e.g. Apple Health, Samsung Health, Health Connect), they will by default be redirected to the auth_success_redirect_url with a null user_id .
This Redirect URL can be used to redirect your end-user to your mobile app instead so that they complete the connection flow to the Mobile-only integrations using Deep Links.
Last updated
Was this helpful?
Was this helpful?
https://widget.tryterra.co/session/demo/success?user_id=bc205b50-dabe-4680-9d35-38517b915dc1&resource=GOOGLE&reference_id=null