auth0/auth0.js

Auth0 nuxt Demo no longer works.

skwasan opened this issue · 9 comments

Please do not report security vulnerabilities here. The Responsible Disclosure Program details the procedure for disclosing security issues.

Thank you in advance for helping us to improve this library! Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community or Auth0 Support. Finally, to avoid duplicates, please search existing Issues before submitting one here.

By submitting an Issue to this repository, you agree to the terms within the Auth0 Code of Conduct.

Describe the problem

Please do not close this issue. This is headache.
Auth0 nuxt package should be maintained by the Auth0 org.

This package and link no longer works.
https://github.com/nuxt/example-auth0
https://auth0.nuxtjs.org/

While nextjs auth0 tutorials are there and works seamlessely. Auth0 nuxt package should also work.

Please create and maintain nuxt package. It's very difficult to integrate it.

Provide a clear and concise description of the issue

What was the expected behavior?

Tell us about the behavior you expected to see

Reproduction

Detail the steps taken to reproduce this error, and whether this issue can be reproduced consistently or if it is intermittent.
Note: If clear, reproducable steps or the smallest sample app demonstrating misbehavior cannot be provided, we may not be able to follow up on this bug report.

Where applicable, please include:

  • The smallest possible sample app that reproduces the undesirable behavior
  • Log files (redact/remove sensitive information)
  • Application settings (redact/remove sensitive information)
  • Screenshots

Environment

Nuxt

Please provide the following:

  • Version of Auth0.js used:
  • Which browsers have you tested in?
  • Other modules/plugins/libraries that might be involved:

Hi @skwasan,

We unfortunately have nothing to do with that Nuxt sample, I would suggest you raise the issue on their GitHub repo.

I shall Up this tread.
It would be very appreciated if you were to update your doc, provide clear procedures and add nuxt to your "technologies" for regular app setup. As Nuxt becomes bigger and bigger, its community would be very pleased if the process to integrate your service was much simpler and without issues. You guys are providing excellent doc for Next. It wouldnt be that hard to provide the same for Nuxt. As Nuxt already has an auth module, it should be very easy to implement, but its literally impossible to find decent informations about the process. You guys should look into this...
Your community is asking for it.

Thanks

Thanks for the feedback. I am wondering what is missing from https://auth.nuxtjs.org/providers/auth0/ that makes you feel like it is impossible to find any decent information?

I mean, we don't have any Nuxt example, but it does look like the Nuxt team has documentation on how to integrate Auth0. If their documentation is out of date or not working as intended, I would reach out to them instead.
The way to integrate Auth0 in Nuxt relies solely on Nuxt internals (auth stuff), that gets connected to our Auth0 backend. I believe there is little to document from our side here, especially given Nuxt has a dedicated section for Auth0.

If the Nuxt team would decide to remove Auth0 from their docs, we could always revisit.

If you carefully take a look at the doc from Nuxt, everything is outdated, examples are from your old platform. Nothing has been updated, links to code examples and snippets are broken. I followed their few steps to implement Auth0 and I have been scratching my head through the whole process. It does'nt work.

The only other doc they provide is links to your old Auth0 Doc website that hasnt been updated either. And even if their doc is not great (and that's on them indeed, I've contacted them also) the Auth0 team as well should be working toward trying to facilitate the integration. Nuxt is one of the biggest framework out there for Vue and yet, you have not added infos on your website to help your customers implement your platform. Far from me the idea of being rude, but This is on your part. I dare you to try to implement it in a Nuxt regular webapp project with their and your documentation currently offered... It's a nightmare.

I don't see how you guys could'nt, first, add Nuxt to your choices of technology on your platform and try to provide a simple working example step by step to implement it in a regular webapp. Nuxt3 is coming pretty soon and it would be vary valuable and a good opportunity for your team to bring on board the whole community. The fact that you replied here is proof that you care for your product and for open-source community, on which Nuxt was built. It would be very much appreciated if you could take the first steps in reaching out to them to try to look into this.

Being a developper, you know that outdated documentation is even worst that not finding any.
Anyway, I love the solution you are bringing to the market and I'd love to use it, but right now, I'm just unable to.
I hope you understand my (and probably others) frustration.

Looking forward to find further infos on your website soon and get news from you.

Thanks a lot for considering this

Cheers

Hey @matreurai ,

I tried creating a new Nuxt application (using https://nuxtjs.org/docs/get-started/installation/), then followed what's mentioned here https://auth.nuxtjs.org/providers/auth0/ and it seems to work fine for the most part (it does look like they tell u to use clientId, but I had to use client_id to make it work.).

I also had to manually install nanoid because of this issue: nuxt-community/auth-module#750

Here you can see what changes I made to the default created nuxtjs project: frederikprijck/nuxt-auth-auth0-example@7d25cc8.

I will raise this internally regarding documentation for nuxt, but regardless it seems like the basics of the documentation from nuxt auth works for the most part.

I do see trying to use PKCE seems to not work the way it's mentioned in the document. I believe it's hard for anyone, including nuxt users but also companies such as Auth0, to create their own documentation if Nuxtjs' Auth's documentation isn't accurate.

Nuxt-Auth v5
Based on this comment, it looks like PKCE is only supported as of @nuxtjs/auth v5+. Once I replace the Auth module with v5, the config mentioned in the docs work fine for me, see: frederikprijck/nuxt-auth-auth0-example@35f1935

Once using v5, we should also use clientId and not client_id.

It looks like the docs are correct but they are already for v5 and wont work with v4, while v5 is not the default version when installing @nuxtjs/auth, you need to npm install @nuxtjs/auth-next. Its definitely confusing, but should be resolved once v5 is the default.

If u don't want to use v5, you should be able to use the same approach as here: frederikprijck/nuxt-auth-auth0-example@7d25cc8, but you wont be able to use PKCE.

Thanks.

Hey @frederikprijck

Thanks a lot for your help.
I've been able to figure it all with your instructions.
I am very grateful and I appreciate the fact you actually took the time to resolve this.
You are the kind of developper I look forward to growing into.
We'll be in touch as our startup will truly consider using your platform for our deployment.
A wonderful day to you.

Kindly,

Thanks for the kind words. I believe we always try to be as helpful as possible.
Happy you got it resolved and looking forward to your experience using our platform.