Vue.js / Nuxt.js

Nuxt Authentication

Auth strategies, JWT, session management, OAuth, middleware protection, refresh tokens, CSRF

20 āļ„āļģāļ–āļēāļĄāļŠāļąāļĄāļ āļēāļĐāļ“āđŒÂ·
Senior
1

What is the main difference between JWT authentication and session-based authentication in Nuxt?

āļ„āļģāļ•āļ­āļš

JWT stores authentication information client-side in a signed token, while session-based authentication stores data server-side with a session identifier in a cookie. JWT is stateless and scalable but exposes data in the token, while sessions are more secure but require server-side storage (Redis, database).

2

How to protect a Nuxt page so it's only accessible to authenticated users?

āļ„āļģāļ•āļ­āļš

Using definePageMeta with auth middleware protects a page. The middleware checks authentication before rendering and redirects to the login page if the user is not authenticated. This approach works in both SSR and CSR, providing robust protection.

3

In an OAuth2 flow with Nuxt, what is the correct sequence of authentication steps?

āļ„āļģāļ•āļ­āļš

The OAuth2 Authorization Code flow follows this sequence: redirect to provider (Google, GitHub), user authentication, callback with authorization code, exchange code for access token server-side. This secure sequence avoids exposing sensitive tokens to the client.

4

Why use a refresh token in addition to an access token in a JWT authentication strategy?

5

What is a CSRF attack and how to protect against it in a Nuxt application with session-based authentication?

+17 āļ„āļģāļ–āļēāļĄāļŠāļąāļĄāļ āļēāļĐāļ“āđŒ

āļŦāļąāļ§āļ‚āđ‰āļ­āļŠāļąāļĄāļ āļēāļĐāļ“āđŒ Vue.js / Nuxt.js āļ­āļ·āđˆāļ™āđ†

JavaScript Fundamentals

Junior
20 āļ„āļģāļ–āļēāļĄ

Modern JavaScript (ES6+)

Junior
20 āļ„āļģāļ–āļēāļĄ

Vue Basics

Junior
22 āļ„āļģāļ–āļēāļĄ

Vue Components

Junior
20 āļ„āļģāļ–āļēāļĄ

Vue Router

Junior
18 āļ„āļģāļ–āļēāļĄ

Pinia State Management

Junior
20 āļ„āļģāļ–āļēāļĄ

Vuex (Legacy)

Mid-Level
15 āļ„āļģāļ–āļēāļĄ

Composition API

Mid-Level
24 āļ„āļģāļ–āļēāļĄ

Vue Reactivity

Mid-Level
20 āļ„āļģāļ–āļēāļĄ

Nuxt Fundamentals

Mid-Level
22 āļ„āļģāļ–āļēāļĄ

Nuxt Data Fetching

Mid-Level
20 āļ„āļģāļ–āļēāļĄ

Nuxt SSR & SSG

Mid-Level
22 āļ„āļģāļ–āļēāļĄ

Nuxt Server Routes

Mid-Level
20 āļ„āļģāļ–āļēāļĄ

Nuxt Modules

Mid-Level
18 āļ„āļģāļ–āļēāļĄ

Vue Composables

Mid-Level
20 āļ„āļģāļ–āļēāļĄ

Vue Forms & Validation

Mid-Level
20 āļ„āļģāļ–āļēāļĄ

Nuxt State Management

Mid-Level
18 āļ„āļģāļ–āļēāļĄ

Vue Testing

Mid-Level
20 āļ„āļģāļ–āļēāļĄ

Nuxt Deployment & CI/CD

Mid-Level
22 āļ„āļģāļ–āļēāļĄ

Vue Performance

Senior
22 āļ„āļģāļ–āļēāļĄ

Vue Advanced Patterns

Senior
24 āļ„āļģāļ–āļēāļĄ

TypeScript with Vue

Senior
22 āļ„āļģāļ–āļēāļĄ

SEO with Nuxt

Senior
20 āļ„āļģāļ–āļēāļĄ

Nuxt Internationalization

Senior
18 āļ„āļģāļ–āļēāļĄ

Vue Architecture

Senior
22 āļ„āļģāļ–āļēāļĄ

Nuxt Security

Senior
20 āļ„āļģāļ–āļēāļĄ

Vue Ecosystem

Senior
18 āļ„āļģāļ–āļēāļĄ

Migration Vue 2→3 & Nuxt 2→3

Senior
22 āļ„āļģāļ–āļēāļĄ

āđ€āļŠāļĩāđˆāļĒāļ§āļŠāļēāļ Vue.js / Nuxt.js āļŠāļģāļŦāļĢāļąāļšāļāļēāļĢāļŠāļąāļĄāļ āļēāļĐāļ“āđŒāļ„āļĢāļąāđ‰āļ‡āļ–āļąāļ”āđ„āļ›

āđ€āļ‚āđ‰āļēāļ–āļķāļ‡āļ„āļģāļ–āļēāļĄāļ—āļąāđ‰āļ‡āļŦāļĄāļ” flashcards āđāļšāļšāļ—āļ”āļŠāļ­āļšāđ€āļ—āļ„āļ™āļīāļ„ āđāļšāļšāļāļķāļāļŦāļąāļ” code review āđāļĨāļ°āļ•āļąāļ§āļˆāļģāļĨāļ­āļ‡āļŠāļąāļĄāļ āļēāļĐāļ“āđŒ

āđ€āļĢāļīāđˆāļĄāđƒāļŠāđ‰āļŸāļĢāļĩ