Auth0 Home Blog Docs

Pass a state to the callbackURL of Auth0 Lock Passwordless

passwordless
auth0-lock

#1

I am trying to pass some user state to the Auth0 Lock Passwordless callbackURL:

Example:

		lock.emailcode({
			callbackURL: 'http://localhost:3000/',
			responseType: 'token',
			authParams: {
				foo: 'bar',
				scope: 'openid name email picture'  // Learn about scopes: https://auth0.com/docs/scopes
			}
		});

I am trying to pass { foo: bar } to the callback page.

Is is possbile? What’s the suggested way of doing so?

Thanks,
Andrea


#2

For the moment I have found a workaround: having a query string in the callbackURL. If there’s anyone with a better solution, let me know :slight_smile:


#3

It appears that passwordless login drops the state parameter rather than passing it through from the authenticate call to the callback call. Does anyone have a fix?


#4