Currently, I have two APIs: /auth and /no-auth. I would like ONLY one of them to use basic-auth. I am using fastify-basic-auth plugin on top of fastify in node. /auth should require authentication. /no-auth should NOT require authentication. Currently, the way my code is set up, BOTH are requiring authentication. Answer To archive it you need to create a new
Tag: authentication
Protect Web pages using password or authentication service
I would like to know if there is a way to password protect web pages developed with simple HTML/ javascript. I am hosting the web page on netlify and I have also tried hosting on Firebase and it is working from both ends but I do not want anyone with a link to be able to view and use the
How to use one JWT token to sign a second JWT token?
The Scenario: A web-app user wants to create an authorised view of a private asset. The user has authenticated and has a jwt token. The app wants to make a fresh secondary jwt token, which can be verified as having been created with the original token. FYI: My use case is signing a url – adding the second jwt token
DId firebase createUserWithEmailAndPassword() change the return value?
I have been using this code for a year now: However I had complaints over the last 2 days of new users having trouble creating a new login. I checked the “user” variable in this code and it looked like this: Which means that I now have to refer to uid by using user.user.uid instead of user.uid. I made this
Why is this simple PHP login script not working?
I am very new to PHP and JavaScript and I have made a PHP and Javascript login script. However, it just shoots out Incorrect username or password. even though it’s correct. Here are my scripts: PHP: Javascript: HTML: I do not see a problem with this so I am not sure what is going on but if you can help
Why my props action doesn’t work in an “if” statement in “onClick”, but it works outside the “if” statement?
This code works: This code doesn’t work: I’m new to reactjs Does any body know why it doesn’t work in the second way? Answer Just a tip; Make a function and then call the funciton onClick instead. The code gets simpler to read!
vue-router beforeEach function does not return item which is updated
I’m stuck with a problem. So here is the scenario. I put an axios request which takes the access token from cookies on store. Then I committed a mutation to make true isLoggedIn variable. Then I access this variable from Navbar to change menu items. It works. But when I try to access isLoggedIn variable with getters in beforeEach function,
How to properly add admin user to a database?
Let’s say I have an endpoint for posting new users with a logic like this: This would work but now of course every user could set the isAdmin flag. Another way would be adding admin users manually to the database but this is probably not the best way. Is there a recommended way to solve this problem? Answer You can
NextJs Authentication with Next-Auth against DRF
I have an exiting Django project that I am trying to move from templates to NextJs frontend. I came across Next-Auth-js which seems to be nice in Next Auth. However, the doc seems to focus more with JS related Backend Auth. Following this example I have sent the NEXTAUTH_URL environment variable to my DRF Endpoint localhost:8002. While the frontend runs
Issue with Auth0 and javascript Lock v11
I’m trying to test a basic authentication module on my web app using auth0 and Lock v1 login form. This is a snapshot of the code I’m using: The problem is that I’m not able to get the auth0 modal since I’m getting the following error: I don’t understand if I’m configuring in a wrong way my application on Auth0