Node.js passport auth0 logout

I was looking at this blog example to implement the passport-auth0 library https://auth0.com/blog/create-a-simple-and-secure-node-express-app/

In the logout section, after doing req.logout(), the blog suggests to construct a logout URL to point to the Auth0 domain for log out.

Why is that necessary? The passport documentation suggests logout is as simple as

req.logout();
res.redirect('/');

http://www.passportjs.org/docs/logout/

1 Like

Howdy, Tri! I am the author of that blog post. Let me research into that more in-depth and I’ll get back to you :pray:

I am currently in the process of updating that blog post :eyes: Thank you for reading it and for sharing that feedback :slight_smile:

1 Like

Thanks Dan. I also opened this issue https://github.com/auth0/passport-auth0/issues/119 while poking around the different resources. Perhaps you can chime in?

1 Like

Definitely! Raising that concern right now. Thank you for bringing this up!

1 Like

Tri, update for you :slight_smile: I raised this concern with the team and they’ll be putting the Passport guidance back on that link. I’ll be following up on this next week. :eyes:

2 Likes

@tridnguyen The URL has been updated to be host the Node, Express, and Passport Quick Start :muscle:

I’ll be researching your other concern about logout this week as I continue to update the tutorial.

2 Likes

Thanks Dan! Looking forward to hear back.

Also, if I were to create a new Node app now with Auth0, should I still be using passport, or express openid connect?

1 Like

You are welcome :slight_smile: For the time being, if you are building a traditional web app, I recommend to use Passport + Auth0. The new Express OpenID Connect SDK may be going through some changes.

When the time comes, I’d like to create a blog post offering migration guidance from Passport to this SDK for those who want to use it :+1: However, Passport still remains a solid tool :shield: We are just looking to provide another option.

2 Likes