All Questions
Tagged with authentication javascript
36 questions
2
votes
1
answer
105
views
Session-based authentication using Express.js
I'm currently learning Express.js and I wrote this authentication code. I'm unsure if what i have is correct, how to improve it and if it's secure. For user and session data storage I'm using ...
3
votes
1
answer
571
views
User registration and login service using JWT
I have created service to communicate with my backend for user registration and login. I use the JS fetch API and send all data through HTTPS. I use JWT tokens to authenticate queries once I have ...
1
vote
1
answer
448
views
React Native login, sign up and sign out using Firebase project
I have built a basic app which uses firebase for authentication.
The app is pretty simple.
Sign up the user to firebase using email and password.
Sign in the user
Sign out the user
Also, I have ...
1
vote
1
answer
103
views
Making my login function more readable and maintainable
I recently wrote a login function in my express application that does the following:
Verifies the user's email and password are correct
Generates a JWT Access Token with a short expiry date, and then ...
1
vote
1
answer
293
views
Private desktop and mobile WebSocket connections with Node.js
Background info
To learn a new branch of my dev career, I've started a new project in my spare time (I've never used WebSockets before and I also want to learn more about common authentication flows). ...
4
votes
2
answers
426
views
Angular Frontend login logic
This is a follow-up to this question Node.js backend login logic. I wrote the following login Angular frontend logic for my Node.js Backend (see the previous question above). Is it any good in terms ...
9
votes
1
answer
456
views
Node.js backend login logic
So I wrote a rather primitive login logic in Node.js, which authenticates the user and handles JWT. Is it any good in terms of security, efficiency, building, async/sync, logging. SECURITY is my main ...
3
votes
1
answer
1k
views
Crypto createCipheriv and createDecipheriv for authentication
I'm not an expert in authentication, so I want to make sure I have done everything right.
I am using crypto.createCipheriv and ...
6
votes
1
answer
1k
views
Handling google authentication with firebase in nextjs web app
Background info
I have just started using/ learning how to use Next.js and developed a basic application which allows users to view several pages, some of which are authentication protected. Users ...
7
votes
1
answer
622
views
nodejs 401 request retry mechanism
I'm working on a project in which I have a backend in nodejs and from there I need to call external APIs, those APIs require authentication token which is valid for 15 minutes. So if response status ...
4
votes
1
answer
62
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 ...
2
votes
0
answers
3k
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 ...
3
votes
2
answers
2k
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
2
answers
332
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 ...
4
votes
1
answer
2k
views
Express routing with a login action using SQLite
I'm new to Express and SQL, so I don't know the conventional ways of combining the two. Right now I have done it the following way:
...