I encountered a reference error while working on a test project assigned by my employer. This issue arose when I reached the final test and came across the term "_user". Can anyone explain what does this mean in this context? 'use strict' let assert ...
Every time the token expires in my application with NEXTjs and I attempt to make a post request, it gets stuck in a loop. The POST request returns 401, then the refresh-token returns 200 after attempting the post again, it returns 401, and the cycle repeat ...
I have been working on creating an API with Express JS. The API was running smoothly until I added authorization for some routes using the JsonWebToken package. When I tried to use the token generated by the package, I encountered the following error: Type ...
So, I have a question regarding the Authentication section of my application. Within my application, I have various components and routes, including register and login. The register functionality is working properly with the API, storing both the usernam ...
After saving the AWS access token in local storage, I attempted to create a higher order component. The goal was to check if the token is present or not in local storage, redirecting to the login page when it's missing. However, there seems to be an i ...
I've added a feature that allows users to sign in with their Google accounts using a button. Once the users select their Google accounts, I receive the following parameters as response from Google: - Access tokens - ID token - Expires in - Token type - C ...
Authentication with JWT in Node.js: const expressJwt = require('express-jwt') function setupAuth() { const secret = process.env.SECRET_KEY return expressJwt({ secret, algorithms: ['HS256'] }) } module.expor ...
Having trouble with the redirection to the login page from my profile page, which is an HTML file and the main page is the login page. I've tried redirecting to both pages, but it always lands in the catch block whenever a redirect is attempted. angular.m ...
Running Symfony 5.4 in a development environment (docker) allows successful logins. However, attempting the same login via docker in production results in the following error message: {"message":"Invalid CSRF token."} The issue seems t ...
In my XSL document, I have a requirement to generate a hyperlink with text that includes a line break, resulting in two separate sentences. To achieve this, I am utilizing the tokenize function to split words based on whitespace character. <xsl:variab ...
Recently, I integrated jwt (JsonWebToken) into my Node.js Express application with MongoDB. When generating the token, I saved the value in a database collection and retrieved it from MongoDB to pass on to subsequent pages. Additionally, I implemented a ...
I’m currently facing a tricky issue with the code below, and it's been quite frustrating. In essence, what I aimed to achieve was: - Store the JWT token from sessionStorage in a state upon successful login. - Save a boolean isTokenValid in another sta ...
I am working on a project that involves Vue 3 with a Node Express back-end server and Firebase integration. On the backend server, I have implemented the following middleware: const getAuthToken = (req, _, next) => { if ( req.headers.authori ...
I am looking to create a cloud computing project using PHP. The main goal of this project is for users to store their files on a cloud server and if any unauthorized manipulations occur, the system should be able to detect and correct them. My question is ...
Hello everyone! I am currently working on a MERN app and have been exploring how to implement JWT token authentication. Everything seems to be working fine, but I encountered a small issue on the frontend. After a user logs in, the token is successfully se ...
One of the main tasks in my app is to authenticate the user and obtain a token using a service. Currently, this service is being used in the mainController which is attached to the body element in index.html. It's crucial for this authentication process t ...
Currently, I am learning about JSON tokens through a tutorial and encountering an error. Previously, everything was functioning correctly with sessions, but now I can't seem to pinpoint the problem even though I'm using identical code. This snip ...
I am currently using Laravel 5.3 as the API for my iOS application. Whenever I attempt to make HTTP calls with headers and parameters, I encounter a 401 error message: message = "Could not decode token: The token "Optional(""eyJ0eXAiOiJKV1QiLCJhbGci ...
Currently, I am developing a C# MVC application within the VS2012 Framework 4.5 to ensure PCI compliance using Payflow Pro from PayPal (https://pilot-payflowpro.paypal.com). We have been utilizing PayflowPro for an extended period, and this is the tool we ...
I have a question about how to properly map a userID to an entity: Let's say I'm using Angular, React, or any other front-end framework. How should I go about sending the userID along with the entity? For example, if a user is creating a Product, here are ...
While experimenting with Postman to sign up a new user with the data {"firstName": "John", "lastName":"zoe", "email":"[email protected]", "password":"123465"}, I encounter ...
Currently working on a website using Angular, I have integrated the Firebase SDK for email/password authentication. The main aim is to automatically generate a new token if the user closes the site and returns after a week. However, I am unsure which func ...
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 ...
I have a question about the efficiency of my code, specifically line 16 (as commented). Would using $row to compare with a variable mentioned above be more efficient than writing another SQL query? When I tried using a variable and $row['field name'], it ...
When attempting to access the app dashboard without authentication, I wanted to redirect the user to the homepage. However, I encountered an issue with Route.push() not working as expected. To test this behavior further, I modified Router.push('/') to Rou ...
Currently, I am encountering an issue with my token system for requesting PHP pages via Ajax. The problem arises when attempting to make multiple Ajax requests from the same page as I am unable to refresh the token on the initial page. To elaborate furthe ...
I am currently working with an authentication system that operates as follows: Users are directed to a third-party login page Users input their credentials The website then redirects the user back to my site, including an auth token in a POST request. Is ...
I've encountered an issue with Laravel Sanctum while creating an API. It works perfectly fine on localhost, but when I deploy it to a live server, the following problem arises: When accessing routes under middleware like this: Route::group(['middlewar ...
I'm attempting to retrieve a token from the server response. It works perfectly fine using Postman, but when I try to debug it on Android, I encounter an error: unsupported_grant_type Below is my code snippet: HttpClient client = new DefaultHttpClient ...
I developed a PHP application that has a login requirement. This application is exclusive, so no new users can create accounts. Initially, I implemented sessions to identify users, but it caused issues on tablet devices as they would lose their sessions. I ...
Our current architecture involves front end Angular and backend nodejs/express. This setup functions in the following order: User logs in to the site via Cognito Hosted UI Upon successful login, the user is redirected to our home page with a code sent in ...