Questions tagged [authentication]

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

Filter by
Sorted by
Tagged with
3
votes
3answers
2k 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...
2
votes
2answers
161 views

Codeigniter 3 Registration and Login System

I am working on a basic blog application in Codeigniter 3.1.8 and Bootstrap 4. The application allows Registration and Login. I have concerns about the security level of the Registration system I ...
4
votes
1answer
291 views

Notify user of credential failure and make another attempt

The below code works because of the do operator on line 24. Is there a more functional way to get the test to pass, or would you consider this an appropriate use of ...
2
votes
1answer
69 views

Python Tkinter login GUI with database

I created a simple login program that works how I wanted them to work. I separated the GUI and database codes into two different python files. I named the files as login.py and dbaseManip.py. The ...
5
votes
4answers
210 views

Java methods to add and authenticate users in MySQL

I'm going through some code and trying to figure out how to get rid of duplicates from the following two methods. Both methods execute a simple login/register query to a local MySQL DB. I couldnt ...
3
votes
2answers
144 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
vote
0answers
16 views

Precompiled templates with initializators (factory pattern) or single interface and method or what else?

PROBLEM I'm trying to use authboss (https://github.com/volatiletech/authboss) with quicktemplate (https://github.com/valyala/quicktemplate). The authboss rendering system is defined by one interface:...
4
votes
3answers
86 views

User management OOP php class

I found a class that i coded for an old project about a year ago and i haven't really touched php in a while. Now i need to use similar functionality again i thought it would be the perfect time to ...
2
votes
0answers
34 views

Middleware for authenticating GitHub webhooks

I'm currently working on a PSR-15 middleware for authenticating GitHub webhooks. ...
2
votes
0answers
37 views

Laravel testing for compatibility between old and new password-hashing schemes

I currently have an event listener tied to Laravel's Attempting class. The listener is designed to rehash an old password to something newer. The current DB stores ...
-1
votes
1answer
56 views

Login to a school system and get account type

I'm new to MySQL database design. My question is this database is correctly built or not. We used the users table to login and get account type and here the code to login ...
1
vote
0answers
168 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 ...
4
votes
1answer
54 views

Account automation through Python (with Flask) and javascript

This is my first time doing a code review so I expect a ton of criticism on this from all you professionals. What am I doing? I'm using python with flask to create a service for my web server. My ...
0
votes
1answer
30 views

Python classes to grab HTTP response from website entities

I am trying to implement a parent WebContent class and child classes to grab HTTP responses from the actual website entities. There are highlevel codes below and I ...
4
votes
1answer
27 views

Better code for error handling in NodeJs and Express

I have this code for a post request, when the user wants to change his password. Because of all the cases and the following page renders the code came out really ugly. Is there a better way to ...
7
votes
3answers
141 views

Java Servlet & JSP simple login

I am currently learning Java Servlets and JSP at university. As a little practice I created a project where I want to be able to login into a protected area. Now, I got it working by using a ...
8
votes
1answer
182 views

One way encoding a password

I wrote a script that one way encrypts a user's password by generating a key, and multiplies by the ASCII value of the character and the ASCII value of the key character at (the position that the ...
1
vote
1answer
62 views

PHP library that can use different authentication mechanisms

I am making a library which can use different auth mechanisms. I have abstracted the code within an interface: ...
2
votes
1answer
88 views

Employee database

To keep in practice with good techniques of java programming, I've decided to write a database. All it does it stores employees, allows users that are logged in to get/set employees, and has a login ...
3
votes
1answer
9k 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 ...
2
votes
2answers
263 views

Log in to Rails app using Facebook SDK

I have built a Rails app where users can login using Facebook. They have an account on the Rails app but do any authentication in it other than creating a session if they have logged into Facebook ...
1
vote
0answers
27 views

Safely log-in and save login info into session [closed]

I would like to ask if this code is safe for user to log-in (save ID to session) and check if user is log-in when visiting site (Dashboard). ...
1
vote
0answers
345 views

Implementation of Private Route with Auth using react-router and Context API

I'm trying to implement safe routes and checking if the user is authorized using only Context API. I'm also trying to avoid that the user can see a PrivateRoute, ...
2
votes
0answers
27 views

WordPress rest api basic auth with IP check

I'd like to use basic auth with the WordPress API, but restrict the capability to a single IP address. I've updated the existing code from here: https://github.com/WP-API/Basic-Auth accordingly. It ...
1
vote
1answer
73 views

Login flow in app

I made the login flow without any reference to a tutorial. So I want some feedback. Basically it sends username and password in a POST request to /token. The app stores the tokens on device, then ...
5
votes
1answer
307 views

Authenticating an internal API with Flask

I'm developing an internal API using Flask, although due to limitations with our platform the endpoints will be accessible over the public internet. It will only have a very small number of users and ...
3
votes
1answer
199 views

Login page using RxSwift in MVVM

I am building a simple login page which will check for username before navigating to another screen and here is how I am doing the binding now. I would like to know if I am doing it right and if I am ...
3
votes
0answers
64 views

Django authentication against Exchange server

I wrote an authentication app for Django and my worry is primarily about the security of my app. My Django authentication app uses exchangelib to authenticate ...
3
votes
1answer
904 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 ...
0
votes
0answers
21 views

Authentication and auto renewal of an API Token

Following is an https call to retrieve the token, once it's retrieved, it's cached. Callers call the addTokenObserver method that sets a timer based on the token ...
2
votes
1answer
70 views

AES CTR mode encryption with HMAC

I am trying to implement AES CTR encryption mode with HMAC authentication for messages. It's encrypting and decrypting fine as long as the key length is 64 bytes, since AES key and HMAC key are ...
4
votes
2answers
106 views

Rudimentary registration and login system

I'd love for someone to review my code. It works fairly well, but I'm still getting the hang of PHP and want to make sure I've got an iron-clad system that isn't hilariously vulnerable. I'm also open ...
4
votes
1answer
33 views

User creation and sign-in script

I made code for signing in users and storing data about them. Everything is fully encrypted and secure also, it is meant to be imported into other code. I'm looking for ways to improve it and to fix ...
6
votes
3answers
173 views

C++ simple password-protected console app

I have been reading about passwords and hashing algorithms and what not and decided to write a program. Overview: The user should be prompted to create a password the first time the program is ...
0
votes
1answer
118 views

Authentication script in Python

I just finished working on a personal project, it is a sort of email type program where you create an account and you can message people, the code works (as far as I’m aware) but it requires review, ...
2
votes
0answers
60 views

Firebase login/registration process for a dating app

I am developing another bigger project, I want to try a simple DatingApp and currently I try to develop a Login and Registration Form. There is no special register / login button, the code will later ...
0
votes
0answers
74 views

Forgot password / Reset password

I have a working example of 2 methods: Forgot password: A user inserts an account number and an email => An email is sent to the user right after it creates a token in the database. Validate Reset ...
4
votes
3answers
1k views

Fill out webform with Selenium

I am automating a webform on a webpage. I am still learning Selenium on the road. I know a few bad/good practices but a code review is always a good thing to do. What should I improve on in my code? ...
2
votes
0answers
32 views

Saving OAuth2 credentials to database with SQLAlchemy

I'm writing web application that uses Google Proximity Beacon API to interact with beacon data. In order to access that data, I need to grant access to use beacons' information for my web application ...
1
vote
1answer
130 views

Using encryption/hashing to create a secure login

I am creating a login for an encrypted chat application which retrieves login information from a MySQL database. I have got to the point where I feel pretty confident that (to the best of my knowledge)...
5
votes
2answers
78 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
51 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
133 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 ...
3
votes
2answers
100 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 ...
4
votes
1answer
343 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 ...
1
vote
1answer
157 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 ...
10
votes
5answers
57k views

Python username and password program

Can the following code be simplified? I think that the program that I have created is very excessive and quite slow. The program runs fine, but I would like to understand if this could actually be ...
2
votes
1answer
113 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 ...
1
vote
0answers
598 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
78 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 ...