Questions tagged [authentication]

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

Using angular-http-auth along with the $http transformResponse option allows for secure

I am utilizing an angular-http-auth library to display a login dialog whenever the server returns a 401 "unauthorized" response. In addition to that, I like to deserialize response objects in my services. For instance, if a service requests information ab ...

Is this session/token authentication mechanism suitable for my web API?

Today, I successfully implemented a session and token authentication system for my web api using http get/post rpc style. Here is the plan I followed: Key: action (param1, param2) : returnvalue1, returnvalue2 login (username, password) : sessionkey, tok ...

Error message: The imported module userClerk from Webpack is not a function

Currently, I am developing a project on Next.js 14 and utilizing Clerk for authentication. In the Navbar component, I am using useUser() as shown in the following code snippet (This code belongs to the UserMenu.tsx component imported in NavBar.tsx): import ...

Explore the concealed features of Laravel like the hidden attributes such as password for enhanced security

As mentioned on http://laravel.com/docs/eloquent, the process of hiding attributes from array or JSON conversion can be achieved by utilizing a protected $hidden variable in the Model. class User extends Eloquent { protected $hidden = array('pass ...

Seamless Authentication - automatic login following registration

Are there any resources available on automatically signing in a user after they have signed up? I could only come up with one potential solution: signing up the user first and then programmatically calling the signIn function provided by next-auth to log ...

Authentication through RStudio proxy servers

I have successfully configured proxied authentication for RStudio Server. When a user accesses RStudio Server, it redirects to a middleware implemented using Express JS. This middleware then takes the user's request and communicates with an authentication ...

Managing the storage of refresh and authorization tokens on the client side: where should they be kept?

My backend is powered by Laravel and the frontend uses Vue. Users authenticate by calling my Laravel API to get an Auth token and a refresh token. The Auth token expires after 2 minutes, while the refresh token lasts longer. Storing the refresh token in l ...

Transmit User Information as State During Twitter Account Verification through Express

Is there a way to implement Twitter authentication that passes state similar to what Facebook does? Despite searching through the documentation, I couldn't find any information about it. Here is the scenario: When a user accesses the endpoint that redire ...

What specific authentication process does react-aad-msal employ?

I'm curious about the authentication method employed by the react-aad-msal library. Do you know if it utilizes implicit flow? Link to react-aad-msal ...

Secure Angular Rails application complete with authentication features and token authentication

I am currently developing a basic app using AngularJS for the frontend and Rails for the backend. Previously, working solely with Rails made it easy to use the Devise gem and work with Rails views (erb). However, I now find myself in a completely different ...

What is the most effective method for incorporating social login, specifically "Sign in with Google", into an already established email/password application and database?

I am exploring the process of integrating Google sign-in into an existing app that already has account signup and login functionality. After following a tutorial on YouTube, I managed to successfully implement Google sign-in on my frontend. Upon logging i ...

What are the benefits of using CouchDB for login functionality, but encountering an empty CouchDB session while utilizing Vue.js and P

Utilizing Vusjs, pouchdb-browser, CouchDB, and pouchdb-authentication I am attempting to verify if a session is active for offline stay logged in. Upon logging in with db.logIn from pouchdb-authentication: response: {ok: true, name: "01HAYJ", ...

Node.js Application with Role-Based Login

I am currently working on implementing role-based administration. When a user is created, the database stores a "1" for Admin or a "2" for a normal user. I want to retrieve this information from the database and display the corresponding start page based o ...

Having trouble with incorporating RBAC in React, facing issues with page rendering post successful login

Struggling to incorporate RBAC into my React application, I have a backend in Node.js that is working well, and for the frontend I'm using Vite and React Router DOM v6. To keep things simple, I decided to store the token and role received from the server i ...

Node.js: The error "req.session.save is not a function" occurred while trying to authenticate

I am currently facing an issue with PassportJS while trying to authenticate users in my application. Once a user logs in, the session is created, but upon redirection, the session seems to become undefined again as it has not been saved properly. I read on ...

Is it necessary to implement an if statement during the login process?

Hello, I'm looking for a way to incorporate an if-statement into my login script. The aim is to check my database for the column 'close_account' and if it equals '1', then display a specific error message. } else { $closed_set ...

Automatic Facebook log-in for seamless status updates using the PHP SDK

I developed a unique app that enables users to update their statuses from external sources using the PHP SDK. My main query is regarding automatically logging in registered users once they've initially authorized their Facebook accounts through the app. I ...

Issue with setting cookie: Browser does not retain cookie after receiving successful response

I am currently working on a project that involves Angular and NestJS, but I have encountered an issue with managing cookies. After logging in through the Angular frontend, the server responds with a Set-Cookie header containing the JWT token. However, for ...

How do the authentication and authorization processes in my frontend connect with the backend of my API system?

Currently, my frontend is built with Vue while my backend relies on an express rest API that fetches data from mysql. My goal is to ensure security for both the frontend (specifically a login form) and backend API without limiting access solely to my front ...

What causes a user to log out when the page is refreshed in a React/Redux application?

Each time the page is reloaded in my React/Redux application, the user gets logged out, even though I have stored the token in localStorage. There seems to be an error somewhere. The token should ideally be saved when the user logs in and not lost upon rel ...

What is the reason browsers do not store JWT tokens in the same manner as they do cookies?

Understanding the distinctions between a cookie and a JSON web token is crucial. With cookies, when the server includes 'set-cookie' in its response header, the browser automatically stores the cookie in local storage. Then, whenever the cookie i ...

Having trouble accessing req.user on my Node.js server using Auth0 and Angular

Currently, I am utilizing auth0 for my admin panel's login system and it is functioning smoothly. However, I have encountered an issue in node where 'req.user' is returning as undefined for some unknown reason. This setup is fairly basic; I have checked th ...

I am attempting to enable automatic login in npm through a bash script, but I am unsure of how to input the username and password when prompted. Is there a way to achieve this?

I am currently working on a bash script to automate the installation of nodejs and setting up a private npm registry. So far, everything has been going smoothly until I encountered the following hurdle: Configuring the npm Registry: To set the npm regist ...

Verify the identity of all REST API requests without the need for a username or password in order to obtain a

I have a unique setup where I am selling products. The API fetches product data from a centralized node back-end and displays it on an angular front-end that is hosted on multiple domains. The challenge I'm facing is the need to authenticate all reque ...

Utilizing Firebase for Microsoft authentication

Currently, I am working on integrating Microsoft authentication with Firebase for a web project built in Vue.js 2. I have meticulously followed the steps outlined in the Firebase documentation and also referred to the Azure portal documentation for creatin ...

Verifying user login on NodeJS through connection from an IIS-hosted website

I am currently upgrading an outdated CMS system and looking to implement a real-time chat feature. The existing CMS operates on IIS, MSSQL, and PHP. The chat feature will be hosted on a separate Linux box running Node.js and Socket.io After successfully ...

Clerk.dev encountered an unexpected runtime error: TypeError - Unable to retrieve data

I've been following the official T3 stack tutorial, but I'm currently facing an issue with clerk authentication. I made modifications to my _app.tsx as shown below: import { type AppType } from "next/app"; import { api } from "~/u ...

"I am trying to figure out how to set a link to an image using JavaScript. Can someone help me

I need help figuring out how to insert an image or gif file within two inverted commas '' in this line of code: _("status").innerHTML = ''; (line number 13 in the actual code) Your assistance with this question would be greatly appreci ...

The function password_verify() consistently yields a negative result

As a beginner, I recently attempted to develop a login system using PHP and MySQL. I successfully created a registration form and added a few users, but encountered issues when trying to create the login form. Every time I tried to log in, it displayed an ...

Exploring ways to bypass authentication using react development tools

Currently, I am delving into the realm of token-based authentication in SPA and a question has been nagging at me. Picture this: in my app, the authentication process works like this - when a user enters correct credentials, they receive a token and the "a ...

What could be causing Nextjs13 to fail in recognizing an authentication route, resulting in a 404 error?

I have been working on a project utilizing NextJs v13 with Strapi v4 as the backend. My project includes separate layouts for the site, login, and dashboard. While working on the login section, I implemented NextAuth for authentication. However, upon submi ...

Unified sign on between two apps within a singular Azure AD B2C tenant (Next.js and wikiJS)

I am experiencing an issue with two apps registered in the same Azure AD B2C tenant. App1 is a Next.js app utilizing Azure AD B2C authentication using msal-react App2 is a WikiJS app equipped with two authentication strategies (customers and employees). ...

Obtain your access token from auth0

Currently, my setup involves utilizing auth0 and nextJS. My objective is to have the user redirected to the callback API after successfully logging in with their credentials. Here is the snippet of code I am working with: import auth0 from '../../uti ...

Limiting the functionality of API's to be exclusively accessible within the confines of a web browser

Currently, I am working with node js and have implemented policies to restrict API access from sources other than the browser. In order to achieve this, I have included the following condition in my code: app.route('/students').all(policy.checkHeader).get ...

Where can I obtain the next authentication secret for the upcoming authorization process?

In order to generate a secret for next auth using NextAuth.js, the documentation suggests running the following command: openssl rand -base64 32 You can find more information in the documentation here: https://next-auth.js.org/configuration/options#nexta ...

Having Multiple Login Forms on a Single Page

I have encountered an issue with my login form code. It works perfectly as a single form, but I need to have 20 of these forms on one page. Despite my efforts to duplicate the code for each new form and adjusting the IDs, I am unable to make more than one ...

Now that connect no longer utilizes the parseCookie method, what is the alternative method for accessing session data in express?

There are numerous examples in node.js and express showcasing how to access session data. Exploring Node.js and Socket.io Express and Socket.io Integration Understanding Socket.io and Session Management Upon visiting the third link, which leads to Stac ...

Secure user authentication using SSL certificates in Django

Currently developing a web application for an exclusive user group that will only be accessible via HTTPS. The server needs to verify if users are permitted access by checking their SSL certificates. I am considering using a whitelist approach, where each ...

Navigating the entire Oauth2 Authentication Process with Vue.js Client and Express.js Server Leveraging Passport.js

I am struggling to comprehend how to effectively utilize the Bearer Access Token obtained from an OAuth2 authentication process. In my situation, the client is Vue.js, the server is Express.js, and Passport.js serves as the middleware for authentication. ...

Troubleshooting: Authentication guard not functioning properly in Angular 2 due to HTTP request

As I work on implementing a guard for certain routes in my application, I face an issue. To grant access to the route, my intention is to send an HTTP request to my express backend API and check if the user's session exists. I have explored various exampl ...

The Next.js application encounters a crash when trying to integrate Google Firebase authentication

I'm encountering an issue while trying to integrate authentication using firebase (via Google) in my next.js application, and the app crashes consistently. I will provide the code for the auth.js page component, as well as where I set up firebase and ...

Enhance the Header component by incorporating a logout button that seamlessly navigates with the NextJS App

Currently, I am utilizing NextJS 14 with App router alongside Spring Boot on the backend. Within my application, I have both public and private routes set up. For the private routes, users are required to log in through a designated login page. Upon succes ...

Form for Logging In using Ajax and PHP

To access and refresh a database with JSON and Ajax, follow the corrected code below: < auth.php >` <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script> ...

After completing the Spotify authentication process using implicit grant in a React application, the redirection is not functioning as

I am working on integrating Spotify authentication using the implicit grant method as outlined in their documentation. I have implemented the relevant code into a React component and successfully logged into Spotify. However, I am facing an issue where the ...

Is it advisable to authenticate/authorize static files employed in pages that require authentication?

I am in the process of developing a cutting-edge angular 2 application. All back-end functionality is handled through REST API, ensuring seamless communication between the client and server. For enhanced security measures, all APIs that require authentica ...

Step-by-step guide on setting up and utilizing the eth-auth (ethauth-server) library

Can you explain the purpose and usage of the eth-auth library? Additionally, could you provide instructions on how to incorporate the ethauth-server npm library into a node.js project? ...

What are some strategies for navigating through Selenium authentication during testing?

I am trying to test an authentication form using Selenium, but I want to avoid including user credentials in the URL. Is there a way to achieve this with Selenium? Here is an example of an authorization form: auth form example ...

Encountered a "no login transports available" error while trying to use Firebase

Currently utilizing Firebase's AngularFire for Facebook logins and encountering an issue with the provided code. Below is my HTML code (including ng-click to initiate login): <a ng-click="loginWithFacebook()" class="btn btn-block btn-social btn- ...

How can you efficiently manage Access & Refresh tokens from various Providers?

Imagine I am allowing my users to connect to various social media platforms like Facebook, Instagram, Pinterest, and Twitter in order to use their APIs. As a result, I obtain access tokens for each of these providers. Based on my research, it seems advisa ...

Enhancing PHP Token Security

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 ...

The authorization header for jwt is absent

Once the user is logged in, a jwt token is assigned to them. Then, my middleware attempts to validate the token by retrieving the authorization header, but it does not exist. When I try to display the request header by printing it out, it shows as undefine ...

Is it possible to integrate the `lnurl` npm library with Nextjs14?

When starting the first boilerplate project in Nextjs14, remember to include the following command: npm i lnurl However, after installation and attempting to use the API by importing 'lnurl', an error occurs as shown below: Import trace for requested modu ...

An issue arises in the NodeJS Express authentication process when attempting to set headers after they have already been sent,

Currently, I am working on developing a basic authentication system using the POST method. app.post("/api/auth",function(req,resp) { var username = req.body.username||req.param('username'); var password = req.body.password||req.param('password'); ...

Guide to authenticating users using Vue JS and Django

Currently, I am collaborating on a compact university venture utilizing Vue JS, Django2, and Django Rest Framework. The project involves two distinct user roles with varying actions within the application. The aspect that is leaving me puzzled is the logi ...

Setting up a simple authentication system with randomly generated values on an Express.js route

My website runs on Node.js with the Express framework. I am looking to create a proxy that can fetch data from the Yahoo Placefinder API since it does not support JSONP responses. The plan is to use jQuery AJAX requests to communicate with the proxy and re ...

Troubleshooting a logout issue involving Ajax requests and header redirection

In order to enhance the security of my system, I am working on a feature that will prevent users from executing functions when they are not logged in. When an unauthorized user tries to do so, a message will pop up indicating that they must be logged in be ...

Getting started with ExpressJS and Firebase Auth: beginner's guide to querying data

Currently, I am in the process of learning ExpressJS by developing a simple website that includes login functionality. My plan is to integrate Firebase for both account handling and database management using Firestore. One challenge I am facing is that Fi ...

Preventing Users from Accessing the Login Page After Logging In in PHP

Essentially, I want to prevent the user from accessing the login page by clicking the back button after successfully logging into the system. Here is the code for login check.php: <?php include 'database.php'; session_start(); if (isset($_POST['nama ...

How to stop the HTTP Basic Auth popup with AngularJS Interceptors

In the process of developing a web app using AngularJS (1.2.16) with a RESTful API, I encountered an issue where I wanted to send 401 Unauthorized responses for requests with invalid or missing authentication information. Despite having an HTTP interceptor ...

When using Python to authenticate with O365 using the `credentials` flow type, an error message is generated stating that the resource for the segment `messages` was not found

Switching my code from auth_type "authorization" to "credentials" was an attempt to eliminate the logon process. However, no matter what I do, I keep encountering the Error Message: Resource not found for the segment 'messages' I've experi ...

Struggling to modify the user password following authentication through Cognito

After creating a user using adminCreateUser, I encountered the challenge of NEW_PASSWORD_REQUIRED while trying to authenticate with adminInitiateAuth. How can I change the password in this scenario? I'm attempting to reset the password for a user with sta ...

Dealing with the "empty_url_error" while configuring a Next.js project with Microsoft Azure AD

I've been working on setting up Microsoft Azure AD authentication, and I believe I have filled in all the required fields correctly. However, despite my efforts to avoid sharing any confidential information, I keep encountering an "empty_url_error" me ...

I am having trouble getting my "sign in with Google" feature (built with Firebase and React) to work properly after deploying to AWS. What could be causing

I'm in the process of developing a React app integrated with Firebase. My aim is to utilize Firebase's auth features to enable users to sign in using Google credentials. Below is the code snippet I've implemented: <button onClick={handleGoolgeSign ...

CodeIgniter Flexi Auth - Redirect users promptly upon login expiration

Is it possible to use the CodeIgniter Flexi Auth library to redirect a user to the login page immediately upon session expiration, displaying a message stating: "Your login has expired, please login again," rather than waiting until page load? I'm co ...

Warning: data and salt parameters are necessary, please provide them

Issue: I am encountering an error with registering a new user, specifically when using Postman. I'm not sure why this error is occurring only in Postman. Additionally, I am facing proxy problems where requests cannot be proxied from localhost:3000 to ...

Guide on implementing a shared layout in NextJS with Auth0 integration

After following the Next docs to configure my layouts successfully, I encountered an issue with the NextJS Auth0 SDK's withPageAuthRequired wrapper that disrupts this setup. The layout pattern I've implemented is based on the guidelines outlined ...

Secure your routes by verifying status on a separate server using JSON Web Token authentication service in NodeJS

Currently, I am working on a project where I am developing an API using Node/Express/Mongo and also building a website with the same tools. I would like to host these on separate servers for scalability purposes. For authentication, I have implemented jso ...

The route to /admin is unreachable with Laravel

Recently, I began a new project using Laravel 5.7 and implemented the standard Laravel Auth with artisan. As part of this process, a new route was added to routes/web.php as shown below: Route::get('/home', 'HomeController@index')-> ...

What is the best way to pass and save information across different routes in Express using Node.js?

Let's delve into the specific functionalities I envision for my server. Essentially, my project involves user registration and login processes. The URLs for these routes are as follows - localhost:3000/login and localhost:3000/register Upon successful lo ...

What is the best way to create a React component that renders a class component as a functional component?

My Objective: At the moment, I am in the process of developing an AuthUserRole HOC component to manage user roles like Manager and Employee. However, I encountered a tutorial that uses a functional component to return a class component as referenced here. ...

Vue SPA authentication

After following various guides on implementing authentication in my Vue application with a .NET Core API backend, I have some questions. You can check out this guide: https://medium.com/dev-bits/a-guide-for-adding-jwt-token-based-authentication-to-your-si ...

Validating Users with OpenID in Vue.js

Utilizing the oidc-client in a basic VueJs project. The IDP server information is correctly configured in SecurityServices.js, with the following oidc config: var mgr = new Oidc.UserManager({ userStore: new Oidc.WebStorageStateStore(undefined), aut ...

Getting a return value from a post request in NextJs 9 Serverless: a step-by-step guide

I am currently working on a serverless application using NextJs but I have hit a roadblock when trying to retrieve a user's JWT in the return value after making a post request to my database. While everything else seems to be functioning correctly, th ...

Enhancing the security of various components by utilizing secure HTTP-only cookies

Throughout my previous projects involving authentication, I have frequently utilized localstorage or sessionstorage to store the JWT. When attempting to switch to httpOnly secure cookies, I encountered a challenge in separating the header component from th ...

Dealing with browser authentication popup in selenium webdriver

Is there a way to handle the authentication alert box in a browser using Selenium Webdriver? I have tried the following code, but it doesn't seem to be working: driver.switchTo().alert().authenticateUsing(new UserAndPassword("uname", "Password")); ...