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.

-2
votes
0answers
19 views

JWT vs simple token authentication in REST API [on hold]

I wanted to use JWT (to learn it) in django-rest-framework instead of the built-in TokenAuthentication so I added ...
2
votes
2answers
72 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
28 views

Secure PHP authentication scripts

I am using PHP and I'd like to create a secure PHP user authentication system. I want it to be as secure and as conventional as possible, especially against SQL injection and session hijacking. ...
0
votes
0answers
34 views

My own login system for a PHP website

I have a website which has its own login system. Passwords are properly hashed, SQL statements are prepared statements and the like. I'm currently working on a few scripts which let users edit their ...
0
votes
0answers
20 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
20 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
67 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
130 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
144 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
83 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
92 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
16 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
262 views

PHP login script using mysqli

Can you guys tell me if my login is secure? Login.php ...
4
votes
0answers
55 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 ...
0
votes
0answers
44 views

Authentication upon app launch

This method runs on startup. It checks if access/refresh is stored. If so, authenticate. Is there a better way to handle authentication? App.xaml.cs ...
3
votes
2answers
110 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
113 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
83 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 ...
0
votes
0answers
210 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
73 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
955 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
121 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
172 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
62 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
188 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
86 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
272 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
754 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
235 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
115 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
281 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
171 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
47 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
129 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 ...
0
votes
0answers
9 views

Barebones cookie functions - just the necessities

I'm attempting to make a simple set of functions to handle cookies. They will only be used to store and retrieve an auth token for accessing an external API. I'm keeping it simple and using some ...
1
vote
1answer
113 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
354 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 ...
0
votes
0answers
162 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
49 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
297 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
1k 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
138 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
312 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
180 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
475 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
85 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
113 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
538 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. ...