Questions tagged [authentication]

Authentication is the act of presenting evidence of one's identity or confirming individuality.

Tips for maintaining a user's session post-login with Passport and Express JS

I recently set up a node backend using express and integrated Passport for authentication purposes. My application has a route called /login for logging in and another route called /me to retrieve information about the currently logged in user. Below is t ...

Implement user registration and authentication in your application using the powerful combination of React, Redux, and Express

I have a React and Redux application that utilizes Express and MongoDB. My goal is to allow users to register for an account, but I am struggling with how to make React/Redux send data to Express. In the long term, I want to store user account details such ...

Securing Access and Privileges within a Product Ecosystem

My product ecosystem consists of multiple products, including an Angular app, a website, and a hybrid app, all powered by a Node backend. Now I want to implement a centralized authentication and authorization system for the entire ecosystem. It needs to b ...

The PyJWT library throws a Signature verification failed error when attempting to decode a JWT

I encountered an unusual problem when trying to decode the jwt token in my Django views. Whenever I use jwt.decode('encoded_token', 'secret'), I receive the "Signature verification failed" message. To work around this issue, I've temporarily disabled the v ...

Is it possible to limit access to a PHP file when a user is not logged in?

I am working on restricting access to a specific file for users who are not signed in to my webpage. I have included an if statement at the beginning of the file to control access. <?php session_start(); if (isset($_SESSION['user']) &a ...

Passport.js encountered an issue when attempting to serialize the user for the session

I'm having trouble with the Passport.js module and Express.js. My code is set up for a hardcoded login for testing purposes. However, I keep getting the error message: I've searched online for solutions on Stack Overflow, but I can't seem ...

Encountering "token_not_provided" error message on all GET routes in Laravel 5.3 with JWT authentication

I'm currently working on implementing authentication using Laravel 5.3 and Angular 2 with JWT. The authentication part is functioning properly, and I am able to successfully obtain the token. However, when attempting to navigate to any GET routes, an error ...

The Route.ts file does not export any HTTP methods

Encountering an error while trying to migrate code from Next JS 12 with pages router in Javascript to Next JS 13 with TypeScript. тип Detected default export in 'vibesrcappapiauth[...nextauth] oute.ts'. Export a named export for each HTTP method inste ...

The Symfony parameter for security, known as "json_login", fails to initialize the controller

I followed the tutorial on Symfony's documentation titled "How to Create an Authentication Endpoint using JSON in Symfony". However, I encountered a problem when making an AJAX call at my login handler. Instead of successfully logging in, I received a 500 ...

Securing Routes in Nextjs: How to Ensure Access Control and Redirect Users Without Admin Role

Currently, I am utilizing the user role within the Context. In order to verify the context of the role in each page's useEffect hook before fetching data and redirecting to login if the user does not possess the admin role, this code snippet is employ ...

The getAuth() helper found in the api directory's Clerk retrieves the following data: { userId: null }

I'm completely stuck here.. Currently working with the clerk and I am looking to access the userId of the current user using the getAuth() helper. For more information, refer to the docs: pages/api/example.ts import { getAuth } from "@clerk/nextjs ...

Creating a custom login/logout feature with AsyncStorage

Starting my React Native journey with my first app, I'm currently working on implementing the login/logout features. My goal is to make the app remember the logged-in user by utilizing AsyncStorage. Here's a snippet of my code: app.js- import { ...