Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [authentication]

Authentication is the process of determining whether someone or something is, in fact, who or what it is declared to be.

4
votes
2answers
46 views

PHP password-resetting page

I am producing a PHP code and I want to implement it in my server to do its function. My question is, are there any vulnerabilities that I should correct? I tried to establish the session first then ...
0
votes
1answer
20 views

Simple Android Volley login request

I've made a simple login API request which gets a token as a response. I had to use Toast a few times. Is is possible to make it with only two ...
2
votes
1answer
122 views

Implementation of login and registration functions in servlet filter

I'm a newbie in servlet API. I have a test task to create a very simple web app with one home page and an authorization form. The requirement is to use filter somewhere in my app. Given that it's a ...
2
votes
2answers
78 views

PHP login system with prevention for session hijacking, fixation, injection, etc

I'm creating a login system and I have been reading a lot about the security measures needed to prevent session hijacking, fixation, and injection attacks, etc. These two Stack Overflow posts were ...
1
vote
1answer
45 views

Expiring JWT tokens in Flask

I've been using flask-jwt-extended for my application and one of the problems I had was logging a session out and making sure the token is not usable anymore. I've ...
2
votes
3answers
235 views

Python login system for a dice game

This is a finished login system where 2 players have to enter their username and password to proceed onto the game. The usernames and passwords are stored in a text file in this format...
0
votes
0answers
24 views

Make API request with Access Token and Refresh

I have a class that makes API requests for a mobile app. The code can be making multiple API requests at the same time. But, if the request is unauthorized, I want to refresh the access token. While ...
1
vote
0answers
185 views

React + Django (session) authentication

Is authentication implemented correctly? At the entry point to the app, which is App.js, query the Django server, which responds whether the current user is ...
2
votes
1answer
71 views

PHP User management class

Here is my code for a class that is responsible for managing some common users task like registration, login and logout. It implements also a sub class that can be used to check the session of a ...
2
votes
0answers
142 views

PHP Login Checker Stage

I have been working on my script which allows people to sign-up and login to my website. I was wondering if someone could review the code. It works but I can't help but feel it could be optimized. ...
1
vote
0answers
319 views

Keycloak js adapter

We are using Keycloak v4.4.0 as SSO for multiple microservices and SPAs. The main goal is to prevent user entering his credentials when landing to another SPA UI. I've not worked with such ...
2
votes
1answer
88 views

Basic PHP user authentication system for an Elm app

I made a simple authentication system with php for an elm webapp that will have a small number (1 - 5) of users able to log in. I am planning to send the users their php session-id at login, and ...
2
votes
2answers
194 views

PHP login/signup validation class

I am working on a blog with PHP, specially in order to practice OOP. Since the blogging system will handle users, i thought that a Validation class would be a good idea in order to not repeat code ...
1
vote
0answers
18 views

Angular2 “Logged In State Watcher”

I have a small website I'm working on as a hobby and I created a login page/home page so far. I wanted to get the basic login/logout functionality going before filling out the main part of my site. ...
2
votes
0answers
652 views

PHP login script using mysqli

Can you guys tell me if my login is secure? Login.php ...
4
votes
1answer
105 views

JWT Authentication Service

Recently I've built a service at my work to generate tokens with JWT (JSON Web Token) "protocol", I would like to show you the code and to get comments from you if that's good enough and if there are ...
3
votes
2answers
227 views

JWT authentication between Django and ReactJS

I am currently using Django (2.1) to build an API, and I have added djangorestframework-jwt to manage JWT. Here is the configuration: ...
2
votes
2answers
123 views

Simple single-file PHP login system

This is something that I initially came up with to protect a bunch of scripts on my personal webserver, but am now planning on using with a few public projects too. ...
-1
votes
1answer
88 views

PHP/MySQL login

I just wanted to ask if this is a secure code (doesn't really matter if it's optimal or not) The code ...
-1
votes
0answers
386 views

A basic MVC with routing and login system in PHP

I started working in PHP and I wrote several things before I noticed that I'm not sure if I'm doing DI right. So, I need someone to review an example of my code and tell me what I did wrong, and I'm ...
1
vote
3answers
177 views

Login module with JDBC

I made simple login module that is responsible for handling registration, and signing in my application. How can I improve this code? Are there any conventions for this case? The idea is to create ...
1
vote
1answer
3k views

Basic object-oriented PHP login, logout, and registration scripts

I am new to OOP in general and have recently started trying to develop object-oriented PHP code instead of relying on a primarily procedural style, as this is a requirement for my studies. One part of ...
6
votes
1answer
146 views

Password Hashing and SQL Queries

I am new to web development and am working on a portfolio piece, so I would like to make sure I'm not creating obvious vulnerabilities. I am wondering whether there are any clear flaws in the ...
2
votes
0answers
270 views

Change the identity from Azure AD to identity of application and return new token

I use this code to change the identity coming from Azure AD in an identity usable by my application, then i generate a token for this identity and return it in the response headers. Is this secure? ...
0
votes
0answers
71 views

Login function using async/await

I have implemented a login function using async/await. The thing is, I don't think my error handling is as clean as it can be. There are return statements in the middle to stop the execution, which ...
7
votes
0answers
246 views

Let's register that Django user

Short intro So, I've been using Django for a while now and thought it would be nice to start a simple application. In an ideal World, each app must have a way of letting its users register and that's ...
1
vote
1answer
92 views

PHP Login and registering system

I am currently learning PHP and decided to write a login and registration system to learn about error handling, mysql, password hashing and basic queries. I know there's standard authentication ...
5
votes
1answer
314 views

PHP login script

I'm hoping someone would be able to identify if my code is prone to SQL injections, and just overall see if there is anything that could be done better. This is also my first time using MySQLi ...
1
vote
1answer
1k views

Login modal with MVVM pattern

I would like some feedback on whether this follows MVVM principles well. The MainPage has a Login button that opens the login modal page. Upon successful login, the LoginPageViewModel will raise an ...
3
votes
3answers
263 views

PHP Signup & Login

I want everything to be well and secure with my authentication code. I've done many signup and login systems before but just for testing purposes, and didn't take into consideration all the security ...
4
votes
1answer
124 views

OpenVPN Login Bash Shell script for DD-WRT router

This script is made to run on DD-WRT as I am running an OpenVPN server on it just to securely connect to my home network when I'm on the go. Basically, the input ($1...
5
votes
1answer
284 views

Flask Framework - user sign in

These functions are more or less the same. They are doing the sign in process for a flask application. A user is retrieved from a database (identified through email address) and the password is ...
4
votes
1answer
213 views

Flask web application, with handling for user login status

I am trying to change some variable in base html-template which other html pages inherite from after entering user in personal account. The idea is as follows: there is base html template and there ...
1
vote
0answers
50 views

Subscribing to multiple sources in RxJava

I have used RxJava to Observe multiple sources and then perform action depending upon values of Observables. I want to know if it can be further simplified. Goal: Complete implementation of RxJava. ...
5
votes
1answer
137 views

PHP - First Login System

I am quite new to PHP, and with the help of a few tutorials have made this login system. However I know its not as efficient and compact as it could be, also I am looking for ways to improve the ...
1
vote
1answer
124 views

PHP member login system

I have php cookie based login system on my website using below given code. I want to know that whether this login system is secure or not, Whether it can be hacked in any way? ...
1
vote
1answer
465 views

Simple login with jsp

I made a simple login page with Java EE, jsp, servlet, tomcat and jdbc. It does following: login user register user after login it creates token for the session so ya can be directed from start page ...
-1
votes
0answers
201 views

Login failure lockout mechanism in Python

I'm building an app and I want to check if a user should be locked out after too many failed login attempts. Here's 2 approaches to the problem, and my gut says that the second version is "cleaner", ...
0
votes
1answer
51 views

Haskell Servant - login endpoint with two error states

Here is one a handler for dealing with logins, I've recently refactored it to try and make dealing with the different error cases a bit more elegant, though I still think there is room for improvement:...
3
votes
0answers
319 views

PyCrypto AES-CFB with SCrypt and HMAC

I am brushing up on my Python, and since I would like to learn a bit about encryption, I figured I would give PyCrypto a try. I obviously wouldn't implement encryption in any production environment, ...
2
votes
2answers
2k views

Simple login user authentication

I've created a simple User Login page. Here User is authenticated [username, password] and if it is a valid user, values like username, name and role of the user is ...
2
votes
1answer
141 views

Authentication API script

I have coded a script that I run when I need to verify the authentication for a user, I use it as a php script and host it on api.mydomain.com. It just simply checks to see if the user details are ...
1
vote
0answers
323 views

ASP.NET Core basic login implementation

I'm fairly new to ASP.NET Core, I've used webforms for years so I naturally want to cling to things I did with webforms. The following code works, but I'm wondering if it can be cleaned up with ...
3
votes
2answers
190 views

Login methods with cookie options

I have a class that has a couple methods - a standard login (when the HTML login form is sent) and login via cookie (for automatic login of returning users). Let's now focus on the ...
2
votes
0answers
20 views

Login Controller follow-up

I was wondering if this class can be refactored to be more efficient. I've taken tips from other people who have already helped me refactor it a fair amount, but I was wondering if there was any last ...
2
votes
1answer
613 views

Laravel LoginController

I have a LoginController in Laravel, but I think it could use some improving, can anyone tell me where I am going wrong? It just seems overall a bit messy, but I can't think of a logical way to ...
3
votes
2answers
86 views

Authenticating to Amazon EC2 Container Registry

New to bash. The script I wrote works, but I don't believe it is written in the best way possible. The script only assesses how to execute the aws ecr get-login ...
2
votes
1answer
1k views

MVVM pattern in Xamarin login form

Please let me know if the MVVM pattern I followed in this is correct or not. Here is the code for ViewModel ...
2
votes
2answers
116 views

Simple authentication and registration of users

I have created a simple authentication script in python that can add users and provides a login function. I've tried to thow as much security into this as possible, which probably wasn't the best ...
2
votes
3answers
754 views

PHP function to check whether a user is logged in

So, I have a function which checks if a user is logged in, but it's a long chain of if/else statements. ...