I am using Auth0 Lock v11 on my React Application with many dynamic routes. The way I am currently handling the lock is when someone clicks on ‘Sign In’, I will redirect the user to an allowed callback url ( currently set to ‘/’) and show the lock.
Scenario:
User is on ‘/blog/:id’
User clicks on Sign In
App redirects to ‘/’
App shows the lock
App Signs In
But what I find happening sometimes is:
User is on ‘/blog/:id’
User clicks on Sign In
App redirects to ‘/’
App shows the lock
App Click Login
Redirected to Auth0 error page saying callback url ‘/blog/:id’ is not allowed
Sometimes the lock will login from ‘/’ which is correct but sometimes the lock will login from the dynamic route which then throws the callback error. I cannot add every dynamic blog route to the callback url so what is the best way to handle this error?
Thanks!