I am in the process of setting up a site using Angular, Express, Node, and Passport. Currently, I am configuring Angular to monitor the $rootScope.currentUser variable with the following code: app.run(function ($rootScope, $location, Auth) { // Watch ...
Looking for advice from those experienced with Angular2/ Ionic on how to restrict access to pages only when authenticated. Although there are a few pages that don't require authentication, the majority need it. Is there a way to automatically push the logi ...
Currently facing the following issue: I am working on a Rails (version 3.2.8) application that utilizes devise for authentication. The backend is a RESTful API while the front-end consists of a backbone one-page app. Although I have successfully implemen ...
Having trouble with basic authentication on IE9 (platform = WINDOWS 7). Any assistance in resolving the issue would be greatly appreciated. Referenced a blog for guidance, but still facing difficulties. Any help in resolving this problem is welcome. Tha ...
Is there a way to create a REST interface method for a resource like the following example? @POST @Consumes(MediaType.APPLICATION_JSON) public void add(@Auth User user, @Valid Food food) { //consume } Unfortunately, attempting to implement this me ...
I am currently working on a project that requires authentication through an external application's API. This API returns a response status (either success or failure) along with an access token. What I need is a straightforward authentication process ...
Currently, I am integrating Websockets into my php project using Ratchet and Symfony. Upon user login, they are automatically connected to a specific channel within the websocket connection. Messages can be pushed to the channel and displayed on the client ...
Currently tackling a project with an issue that needs resolving. I am looking to integrate user login logic utilizing the Passport API, but struggling to grasp its functionality, especially when implementing it using plain SQL queries. While scouring thr ...
I am currently in the process of implementing authentication for my application, but I have a specific question. I have set up basic authentication on the backend, generating a token that is then sent to the frontend and stored in a cookie. I have learned ...
Greetings, I have successfully implemented a login feature using C# webservice and ajax calls. However, there seems to be a security issue that I need assistance with. In my application, I have two types of users - admin and regular user. The problem arise ...
Looking for a straightforward way to authenticate users in Symfony similar to Laravel's Auth::attempt(... method. My user entity already implements AdvancedUserInterface, and I've been reviewing the Symfony security documentation. I'm searc ...
While I am aware that the answer may lean towards being negative, I am currently in the process of developing a series of web pages for an IST assignment in Year 9. Unfortunately, the web page cannot be hosted and our assessor lacks the expertise to utiliz ...
I'm attempting to implement an on-page login feature. It functions perfectly without the use of ajax. Below is my login.php code; if($_POST) { $username =$_POST["username"]; $password =$_POST["password"]; $query = $handler->query("SELECT ...
I'm in the process of developing an authentication system for my Next.js app that utilizes the app router. The app features a login route and a user dashboard route. Upon successful login (with the correct username and password), I store the user data ...
Struggling to Authenticate the API with Rest Assured? Does anyone have an example of authenticating and authorizing an API using Rest Assured? ...
About the Issue: I am currently using Next.js version 14.0.4 for a web application, and I have encountered a problem with browser navigation following user logout. The issue arises when a user logs out and then tries to navigate back using the browser&apos ...
Currently, I am using Express/Node and have developed authentication middleware to validate JWT on each request. My requirement is to disable this middleware for a specific route (POST '/api/user/') while keeping it active for another route (GET ...
I've been working on integrating next-auth with my next js app using the Credentials provider. However, I'm facing an issue where every time a login fails, it automatically redirects to the /api/auth/error route. What I actually want is to handle errors by ...
I am facing an issue with my login form. After collecting the user's email and password, I use JavaScript fetch to send the data to Express. Then, I validate the inputs using express-validator. However, when I try to redirect to another page using res ...
I am currently in the process of building an application using next JS. While trying to authenticate the user through the login page, I encountered an issue when attempting to retrieve the access token from local storage. The error message "localstorage i ...
Currently, I am working on acquiring an access Token through the Client Credentials Flow in the Spotify API. Below is the code snippet that I have been using: let oAuthOptions = { url: 'https://accounts.spotify.com/api/token', method: 'POST', header ...
I'm currently working on developing a mobile app using React Native along with a NodeJS/MongoDB API Backend. One of the key features I want to integrate is social authentication through Google/Facebook, but it's crucial for this process to occur ...
After struggling with an error for the past two days, I finally found a solution. Despite searching extensively, I could not find a single answer that resolved my issue, but rather multiple answers that collectively led me to the solution. So, let me expla ...
I'm currently in the process of developing a media server that will feature a small star icon next to each video. By implementing a JQuery event handler, whenever the user clicks on the star button, an AJAX POST request will be sent to the server's favorit ...
Currently, I am facing a challenge where I need to send an ajax POST request (json) to a different domain. However, since I am testing on localhost and do not have access to the server yet, everything is a bit more complicated. Unfortunately, it is not po ...
After creating a node rest API using firebase to handle user login authentication with a JSON payload containing username and password, I am now faced with the challenge of integrating this functionality into my spring application in a secure manner that d ...
Working on a school project involving a Weather info web page has been quite the journey. Most of it is complete, except for one issue that I can't seem to figure out. The index page with login and registration functions is connected to phpmyadmin/mys ...
What is the process for updating a session in the server side using authV5 in the most recent update of nextjs? I have attempted the following: import { update } from "@/auth However, I am unable to locate the update function within the auth module ...
When working with routes affected by a user's authentication status in NextJS 13, what is the most effective approach? I have two specific scenarios that I'm unsure about implementing: What is the best method for redirecting an unauthenticated user (e.g ...
Hello, I am facing an issue with using my token in the application after the user logs in as I am receiving an undefined response in the console. Below are the snippets of code I have been working with. How can I modify my code to successfully access the t ...
After setting up a /api/login endpoint to handle user login functionality, I created a login.js page to send form data to the login API. The login API authenticates user credentials stored in the database, generates a token, and saves it to a cookie. awai ...
When looking at this snippet of code: this.router.navigate(['/login'],{queryParams:{returnUrl:state.url}}); An error is displayed stating that "Property 'url' does not exist on type '(name: string, styles: AnimationStyleMetadata". ...
Here is a snippet of code related to saving registration data to a text file. Now, on the login page, I need to read and verify this data so that users can log in. <?php if (isset($_POST['submit'])) { $name = $_POST['forename']; $password = ...
When it comes to logging out a user who has logged in using basic Auth, I am exploring different options by consulting various sources like: link1 link2 In my application, I have implemented express-basic-auth to secure certain routes. Here is an example ...
I have been developing thesis software that involves retrieving variables within closures. Below is the code snippet written in node.js: var kepala = express.basicAuth(authentikasi); // authentication for login function authentikasi(user, pass, callback ...
My backend is built with express.js and Sequelize, and the authentication route is as follows: exports.signin = (req, res) => { Admin.findOne({ where: { username: req.body.username } }) .then(admin => { ...
My application is utilizing devise for security, with a session timeout set to 30 minutes. Everything works fine when users navigate normally - if they click a link after timing out, they are redirected to the login screen with a message stating "Your sess ...
Has anyone successfully used Webdriver with Python to navigate the User Authentication window in IE? I have received suggestions to use AutoIT, however, I am determined to find a Python-only solution. Despite attempting to utilize python-ntlm, I continue ...
In developing my Next.js app, I encountered a challenge while setting up the authentication/authorization system. My approach involved using a refresh token with a long duration stored in an httpOnly cookie, along with an access token with a short duration ...
Whenever I try to log the session variable inside the Dashboard component, it comes back as undefined. However, when I log it inside the getServerSideProps function, it returns the correct details. Am I missing something here? Objective: My goal is to fet ...
While the LSID cookie can indicate if a user is logged into a Google account, it cannot be reliably used to determine if someone is signed into the Chrome browser because it may also appear when a person is signed into Gmail without being signed into Chrom ...
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 ...
While I have been using my own authentication and authorization code with Symfony2 as a framework, I recently decided to explore Symfony's security system. Following the tutorial on their website, I successfully set up login using my database. However, no ...
This is all new to me. My users are on AAD and I want to authenticate them using node js. Can anyone provide some guidance on where to begin and the steps to take? ...
My current setup involves utilizing React and Express for this application. React is running on PORT 3000, while Express is running on PORT 3001. Authentication on the Express side is implemented using JWT. Here is an overview of my auth.js service file: ...
Currently, I am working on an iOS application that requires user login using a unique user ID and password. The existing flow of the process is outlined below: 1) Users input their user ID and password. 2) Upon clicking the login button, a PHP webservice ...
I'm embarking on my journey with Nextjs and I've hit a roadblock when it comes to setting up the authentication aspect. I know that Nextjs commonly uses NextAuth for handling authentication. My initial instinct was to integrate providers like Google, but I ...
Currently working on developing a node/express backend and looking to establish an API that is exclusively compatible with my reactjs frontend (private API). Let's take the example of an e-commerce platform where users can browse products, make selections ...
Creating a user-based application using Meteor (v1.3) requires strong authentication and authorization mechanisms. I found an insightful example by the author of Flow Router that delves into setting up authentication and authorization using Flow Router. h ...
After successfully implementing Ember-Auth using a pure token based approach, I am facing a challenge in redirecting users to the root of my app once they sign in. Although I know about actionRedirectable (refer to for details), since I am using a pure t ...
In my project, I have implemented CodeIgniter as the PHP framework. However, there are concerns about its vulnerability in the login process, with someone claiming they can easily log in without a password. Currently, I am only using MD5 hashing for secure ...
Just starting out in this area of development, a colleague shared some information with me on how to retrieve the database. I'm feeling a bit lost as to what to do next. curl -X GET -H "Authorization: Token token=xxxxxxxxxxxxxxxxxxxxxxxxx" "https://www.ex ...
Although there have been multiple versions of this question, I couldn't find a helpful solution. function isAuthenticated() { return compose() // Validate jwt .use(function (req, res, next) { // allow access_token to be passed through ...
I've successfully built a couple of expressjs applications in the past, but I'm currently struggling to figure out how to pass the User Model to the front-end or include it in the req as a parameter. The app functions as a one-page web applicati ...
While attempting to access the reed.co.uk REST web API in order to retrieve all related jobs, I am encountering an issue. Despite passing my username and password, a popup window keeps appearing when I call the URL. The alert message displayed reads: i ...
I currently have a website that has authentication functionality implemented using Next.js, NextAuth, Prisma, and MySQL. My next step is to develop a React Native app for this website, but I'm uncertain about how to handle authentication. Should I utilize ...
Implementing vue.js. I've created an authentication file (auth.js) that stores the user information upon detecting a change in authentication state. There are other sections of the website that need to update when the user information changes. What is ...
I have implemented authentication in my express app using passport, passport-local and passport-jwt. The login code below generates a token which is then sent back via the response object. However, when attempting to login using Postman, the request never ...
I am facing an issue with setting the UI state based on whether a user is logged in or not. The UI should display different states accordingly. I am currently using SSG for page generation and SWR for user data retrieval. However, I noticed that when call ...
I'm currently working on a project that involves developing the frontend in Next.js using the fetch API for requests, and the backend in RoR. The challenge I'm facing is setting up user authentication. After some research, I've come across four possible so ...
I am working on a project using Meteor (Meteor.com) and I want to incorporate iron-router for the page routing along with the pre-existing accounts-ui package for login functionality. Previously, my {{loginButtons}} functioned properly, but ever since I i ...
I am looking to incorporate JWT auth into my Next app. Currently, I have mapped out the flow as such: User enters email and password to log in Server responds with status 200 and a jwt access token in httpOnly cookies My main dilemma lies in deciding on ...
I'm currently working on a project in Python using Selenium to extract data from the following website: However, I've encountered an issue where after entering the username and password, the "Submit" button does not seem to work. I would greatly ...
Currently, I am in the process of developing an express server that enables users to authenticate using two third-party services: Google and Steam. The authentication is accomplished through JWT and functions well when only one service is active. However, ...
My current setup involves an authentication component that verifies whether the user has a token stored in local storage. Below is a snippet of the code: import { useRouter } from "next/router"; import { useState } from "react"; const ...
I'm brand new to learning Javascript. Recently, I created a template for a login page and it's working perfectly fine. However, I am struggling with setting up validation and navigation. My goal is to redirect the user to another page if their username is ...
I recently updated the authentication method for my Go web server from using Bearer tokens to utilizing cookies. During the login process, I now set a cookie for both the token and refresh token like this: a.AuthRepo.StoreInCookie(res.Token, "token&qu ...
My goal is to create a key that remains valid for 10 days from the date of generation. This key should allow anyone to access an API for a period of 10 days. I specifically want to implement this functionality using PHP only, without relying on sessions or ...
I'm encountering a debugging challenge and would appreciate any assistance from the community. I've been working on my first React app and successfully implemented a Login feature, but after a user logs in, they have to hard refresh their browser ...
I am working on a code to log into megaupload. I'm stuck on how to verify that the login was successful. Even though I print out the current URL at the end of the code, all it returns is www.megaupload.com when I run the script. import mechanize import ...
I am working with the PayPal Payout SDK and using the code below to obtain access tokens from the PayPal API. curl -v POST https://api-m.sandbox.paypal.com/v1/oauth2/token \ -H "Accept: application/json" \ -H "Accept-Language: ...
When it comes to handling authentication in my app, I've implemented protected routes using Clerk's middleware: import { authMiddleware } from "@clerk/nextjs"; export default authMiddleware({ publicRoutes: ["/sign-in", "/sign-up ...
Currently, I am developing a user authentication backend using express and mongoose. My main focus right now is enabling users to update their name and email address. To achieve this, I am implementing a system where the email input is cross-checked with ...
My email function using CodeIgniter Version 2.2.1 is encountering errors. Below is the PHP code snippet: $config = array( 'protocol'=>'smtp', 'smtp_host'=>'ssl://smtp.googlemail.com&a ...
Currently, I am working on building an application using AngularJS for the front-end and JavaEE for the back-end. In my AngularJS application, I am trying to access a REST resource provided by the back-end which is protected with JAAS authentication, allow ...