---
title: "Discussion on \"Getting Started with Next Auth\" | Hashnode"
description: "Discussion on \"Getting Started with Next Auth\". Unlocking Seamless Authentication: A Guide to Getting Started with Next Auth"
url: "https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Getting Started with Next Auth](https://blog.dotarjun.com/getting-started-with-next-auth?utm_source=hashnode&utm_medium=feed)

Unlocking Seamless Authentication: A Guide to Getting Started with Next Auth

Jul 7, 2023 · 8 min read · blog.dotarjun.com  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#authentication](https://hashnode.com/tag/authentication)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Arjun](https://hashnode.com/@dotarjun)

@dotarjun · Delhi, India

  
[View profile](https://hashnode.com/@dotarjun)

Full Stack Dev

Full Stack Dev

## Responses 7

Markdown supported · ⌘↵ to post

[Hrithwik Bharadwaj](https://hashnode.com/@hrithwik)

[Jul 9, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64aa4368395b682e51ab682f)

I am super new to next-auth and trying it for my new [side project](https://prepwithai.vercel.app/) .

I have few questions

-   How can I get custom data which is stored in the DB for the user like userId. (Should I use the session hook and whenever the use session is called , it makes a DB call)
    
-   How can I stop making a session API call everytime the tab is switched ?
    

[Arjun](https://hashnode.com/@dotarjun)

[Jul 9, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64aa4368395b682e51ab682f#reply-64aa7156a25b1020144627a6)

1.  Yes, using the NextAuth session hook is a good option to fetch custom user data.
    
2.  For that use case, you should store the user data in cache on the client side. You can use sessionStorage to do that. This way you only make the API call once, and on subsequent tab switches you read from the cache.
    

[Chaitanya](https://hashnode.com/@chaitanya999)

[Jul 8, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a9a8d9a25b1020144618a9)

Are there any limitations or drawbacks to using NextAuth? ❓

[Arjun](https://hashnode.com/@dotarjun)

[Jul 9, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a9a8d9a25b1020144618a9#reply-64aa6e4aa25b10201446275e)

One downside is that you will have to manage the security aspects of saving passwords in databases yourself.

[Abhay Singh Rathore](https://hashnode.com/@abhaysinghr1)

[Jul 8, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a9770f395b682e51ab5b0d)

Great tutorial on getting started with Next Auth! It's impressive how Next Auth simplifies authentication and offers flexibility with various providers. Looking forward to exploring more customization options.

[Arjun](https://hashnode.com/@dotarjun)

[Jul 9, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a9770f395b682e51ab5b0d#reply-64aa6e10a25b102014462756)

Have fun! Abhay

[glyphh09](https://hashnode.com/@harshal8)

[Jul 7, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a872ba1d7a46204479e573)

What are some real-world applications where NextAuth excels? 🌐

[Arjun](https://hashnode.com/@dotarjun)

[Jul 8, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a872ba1d7a46204479e573#reply-64a8ef5d1d7a46204479ebf3)

A lot of projects use NextAuth. You can try searching through GitHub to find loads of examples

[Kirti Madan](https://hashnode.com/@kirtimadan2512)

[Jul 7, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a84ab51d7a46204479e1e4)

Can NextAuth be integrated with existing user databases? 🔗

[Arjun](https://hashnode.com/@dotarjun)

[Jul 8, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a84ab51d7a46204479e1e4#reply-64a8ef0d1d7a46204479ebeb)

It can

[Vineet Bhasin](https://hashnode.com/@Vneet)

[Jul 7, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a836b8a25b10201445f1aa)

I wonder if NextAuth supports social media authentication like Google and Facebook? 🤔

[Arjun](https://hashnode.com/@dotarjun)

[Jul 8, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a836b8a25b10201445f1aa#reply-64a8ef061d7a46204479ebe5)

It does. I have written about that in the Pros section of NextAuth

[jai takkar](https://hashnode.com/@Mage6679)

[Jul 7, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a836801d7a46204479dfd1)

How does NextAuth handle session management? 🔄

[Arjun](https://hashnode.com/@dotarjun)

[Jul 8, 2023](https://hashnode.com/posts/getting-started-with-next-auth/64a832418dee05a5f82599b6/comment/64a836801d7a46204479dfd1#reply-64a8eeec1d7a46204479ebdd)

NextAuth uses JSON Web Tokens (JWT) to manage user sessions.
