![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
It is an evolution of the @nuxtjs/auth package.
nuxt-auth
dependency using yarn or npm to your projectnuxt-auth
and @nuxtjs/axios
to modules
section of nuxt.config.js
{
modules: [
'nuxt-auth',
// ...Axios module should be included AFTER @nuxtjs/auth
'@nuxtjs/axios'
],
// Default Values
auth: {
login: {
endpoint: 'auth/login',
propertyName: 'token'
},
logout: {
endpoint: 'auth/logout',
method: 'GET',
paramTokenName: '',
appendToken: false
},
user: {
endpoint: 'auth/user',
propertyName: 'user',
paramTokenName: '',
appendToken: false
},
storageTokenName: 'nuxt-auth-token',
tokenType: 'Bearer',
notLoggedInRedirectTo: '/login',
loggedInRedirectTo: '/'
}
}
Set the global settings for the login action.
Sets the global settings for the logout action.
Sets the global settings for the fetch action.
Set the token name in the local storage and in the cookie.
Sets the token type of the authorization header.
Sets the redirect URL default of the users not logged in. This is actived when 'auth' middeware is register.
Sets the redirect URL default of the users logged in. This is actived when 'no-auth' middeware is register.
// ... code ...
store.dispatch('auth/login', {
fields: {
username: 'your_username',
password: 'your_password'
}
}) // run login
// ... code ...
store.dispatch('auth/logout') // run logout
// ... code ...
store.state['auth']['token'] // get access token
// ... code ...
store.state['auth']['user'] // get user data
// ... code ...
store.getters['auth/loggedIn'] // get login status (true or false)
// ... in nuxt.config.js ...
router: {
middleware: [
'auth', // If user not logged in, redirect to '/login' or to URL defined in notLoggedInRedirectTo property
'no-auth' // If user is already logged in, redirect to '/' or to URL defined in loggedInRedirectTo property
]
}
Copyright (c) Nuxt Community
FAQs
Authentication module for Nuxt.js
The npm package nuxt-auth receives a total of 28 weekly downloads. As such, nuxt-auth popularity was classified as not popular.
We found that nuxt-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.