Auth0 allowLogIn and allowRegister

Hi there,

I have a web app and mobile app using same Auth0 application for login.
I have followed this Auth0 angular guide (https://auth0.com/docs/quickstart/spa/angular2/01-login) and Auth0 Ionic3 guide (https://auth0.com/docs/quickstart/native/ionic3/01-login) and everything works fine.

Now My app has two different buttons for login and registration. When login is clicked, I want to only show Auth0 login dialog and when register is clicked, I want to show only Auth0 registration.

As I am not using Auth0 Lock, allowLogin option does not work. I was wondering if there is a way to achieve this? Also, I will need to modify the Auth0 UI to match my app theme.

Any help would be appreciated.

Many thanks,
Jay

Hey there @jayesh.ce!

I’m not sure if it’s that easily customisable without Lock. Let me check and diiscuss it internally and get back to you!

Any updates anyone please

So pretty much I believe there are two ways to develop the app with our stack. You can either go for Lock which gives you a general UI that you can more or less customise based on your needs along with using the SDK it’s hitting proper API endpoints in the background etc etc (where you can make use of allowLogin)

The other approach requires more development work from your side as you will only be using our Authentication API hitting the right endpoints to handle login / signup / logout and with that solution you will need to build the UI itself (which you can build base on your project needs)

Thanks Konrad. I am happy to use Authentication API if they are javascript. I am building a progressive web app using Ionic hence I would need this to work on both mobile and web. Also, I have to use silent authentication in both mobile and web. Can you please point me in the right direction?

Glad to hear that! When it comes so silent authentication, this will be your doc to go:

Thanks for your help Konrad. Can you please send me docs link to login/signup/logout apis? are you referring to JSDoc: Global?

Hey there @jayesh.ce!

The link you attached is for auth0.js one of our libraries. Basically you need to think of our libraries, SDKs and frameworks as an interface. All of them have proper API endpoints implemented under the hood then once you’re using one of them you simply use certain functions which that simply hit those endpoints for you.

If you want to develop the system yourself hitting endpoints yourself of course you can do it! When it comes to login / signup / logout API it’s Authentication API that you can find here:

https://auth0.com/docs/api/authentication

Hi @konrad.sopala,

I am not keen to used API end points rather more keen to use some sort of javascript library. Can I use auth0.js library and https://auth0.com/docs/quickstart/spa/angular2/05-token-renewal as my app is written in angular/Ionic?

Yep then auth0.js and Lock should be your options!

I am staying away from Lock as I am creatingmy own UI and personally I think it still has some limitation on mobile app so just want to use auth0-js and the doc you sent me for silent authentication. I will create my own UI. Do you think this is right approach? Just confirming now before I commit to something. Thanks

Yep sure! I believe you can totally go this way.

Many thanks @konrad.sopala. Much appreciate your help.

No worries! We’re here for you!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.