Quantcast
Channel: Cheking if "admin" or "user" using fetch in reactjs - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Bravo for Cheking if "admin" or "user" using fetch in reactjs

here's how you check for the role in the token // fake the result: var json = { result:...

View Article



Answer by Jacob for Cheking if "admin" or "user" using fetch in reactjs

It looks like your token is in the format of a JWT, or "JSON Web Token." First of all, a caveat: it's super dangerous to expose JWTs through an API like this. It's far preferable to keep JWTs...

View Article

Cheking if "admin" or "user" using fetch in reactjs

i need to verify when the user longin (using fetch API) if role == "admin" or "user" using token. if role == "admin" then make a redirection to /accounts for example, otherwise if it's a "user" then...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images