Features
FAQ
Pricing
Docs
Blog
Features
FAQ
Pricing
Docs
Blog
Sign up
Sign up
  1. Help Center
  2. Configuration
NOTE: This article has been superseded.
Go to Documentation Home.
NOTE: You're viewing an article about a prerelease feature.
The information here is still being tweaked and may change.
As always, contact support if you have any questions.

Using Auth0 with Linc

By 
Glen Maddern
Last updated: 
January 29, 2020

Several of our customers use Auth0 to manage their user accounts across multiple social providers as well as usernames & passwords seamlessly. Behind the scenes, we do too. But it's not immediately obvious how to get Auth0 working once you've started deploying preview URLs on every commit.

The difficulty comes from the fact that in your "Application" settings in Auth0, you typically restrict login flows from your own, production domain:

This locks down your Auth0 flow to only permit logins from https://your-app-name.com

But with Linc, you suddenly have a new domain for every commit:

Most commits will produce a new Bundle ID, which means a new hostname for Auth0 to track.

Thankfully, the solution is as simple as adding a wildcard for configuration of the Auth0 settings:

--CODE:language-bash--
https://your-app-name.com, https://your-app-name--*.linc-preview.sh

Note, it is important to include the double dashes (--) after your site's name, that's Linc's way of guaranteeing that only your site's preview URLs will match the pattern.

This is what it looks like in your settings page:

Now all your Linc preview URLs should just work!

Advanced options

Linc doesn't just generate URLs per commit, but also produces branch and release preview URLs:

Each branch has a permanent URL like this that points to the latest commit.
Your currently-released version of your site (usually the latest commit on `master`) can be previewed against all your environments here.

The above configuration setting will work fine for these, but optionally you might like to lock down access further:

--CODE:language-bash--
# Only allow per-commit preview URLs against the staging environment:
https://your-app-name--*--staging.linc-preview.sh

--CODE:language-bash--
# Allow "development" branch to be previewed against any environment:
https://your-app-name--development--*.branch.linc-preview.sh

Either way, Auth0's settings gives you the flexibility you need to control exactly which Preview URLs have access to your application!

Related Articles
Build environment variables
How to define build-time environment variables.
Need additional support?
email us
contact@linc.sh
Twitter
@linc_bot
SLACK
lincbot.slack.com

The Perfect CI/CD Pipeline for your Frontend

Linc
  • Home
  • Pricing
  • Sign In
  • Sign Up
  • Live Demo
Learn More
  • Documentation
  • Blog
Get Help
  • Support
  • Contact
Legal
  • Terms & Conditions
  • Privacy Policy
© Bitgenics Pty Ltd 2019
M/710 Collins Street
Docklands
VIC 3008
AUSTRALIA