Integration with an app is not as easy a it could have been

Trying to integrate Auth0 Javascript library, I find myself having to go through several tutorial, copy-pasting many code fragments into my app. Many tutorial states that the examples are “not production ready”, without too much information about what is missing.
Going over the first tutorial leaves you with copied-pasted authorization.js file that always sends the user to a login page every two hours, doesn’t handle token renewal or silent login. That’s barely enough for POC.
I imagine that the vast majority of applications have extremely similar login requirements. Therefore, I expected to have a much more structured integration. More of a plug and play approach than DIY tutorials.

Hey there @emoshe!

Firstly I’d like to apologise for not reaching out for so long. We’re doing our best to provide valuable knowledge and support to our developer community but sometimes we’re simply people constraint, thanks for understanding that!

Getting back to what you raised, it’s very good feedback, I’ll forward it to our product team but can you also provide us with real or imaginary usecase and path of learning development that you would consider more valuable so we can setup on the same thinking ground!

Thanks a lot for that!

Thanks for getting back to me @konrad.sopala!

I would love to share the code we had to implement to use Auth0 in private if you find it valuable. We have pretty standard React.js application and the login flow is decoupled from our application. Therefore, I would expect Auth0 as a third party authentication provider to provide either a higher level library (compared to auth0-js) I can just plug in, or very through, production grade example I can use and customize.

For reference, my authentication.js file is now 230 LOC while the example is just 97 LOC (https://github.com/auth0-samples/auth0-react-samples/blob/master/01-Login/src/Auth/Auth.js).
In addition, it seems that the example only renews tokens when the page is loading, but not when the token is expiring without the component re-renders. Therefore, we had to come up with a axios.js interceptor that makes sure the JWT token is valid before each request (kind of a middleware).
What I’m trying to say here is that integrating Auth0 required a lot of engineering on our end that I would have expected to receive “off the shelf” from Auth0.

Hey @emoshe!

Gotchya! Sure feel free to share the code with me via DM! Thanks for expanding on your feedback. I feel I know get your point better and can transition it to our product team.

As there is no ultimate solution to this case I feel like your previous reply is the closest to the clue so I’ll mark it as solved but looking forward to learning from your case so as to improve our product!

Thanks a lot!

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