Questions tagged [react-oidc]

15 questions
3
votes
1 answer

react-oidc-context redirects to originating route after successful login with auth0

Hi I'm trying to use react-oidc-context to authenticate with auth0 and I have one problem. After successful authentication with auth0 I always get redirected back to the route I was on when I clicked the login button. The app has 2 unprotected…
Oversteer
  • 1,778
  • 1
  • 22
  • 38
2
votes
0 answers

excel add-ins react oidc-client logout not working

I am creating excel add-ins using office.js, react.js and JavaScript. We implemented authentication using OIDC-client library. Authentication is working and we are receiving access_token and user details but if we click on sign-off from desktop…
1
vote
0 answers

HTTP interceptor in React to add token

I need to add the access token to HTTP requests. My approach is to use useEffect to listen for changes in the auth object and respond by setting up an axios interceptor -- and removing a previos interceptor if there was one (because the token value…
Richard Barraclough
  • 2,625
  • 3
  • 36
  • 54
1
vote
0 answers

oidc-react with settings from API

I'm struggling to get OIDC login working with React -- into day 4. Now trying oidc-rect and the problem that I have is that it assumes that the settings are hard-coded, but I need to load them from /settings. Here's the code for loading the…
Richard Barraclough
  • 2,625
  • 3
  • 36
  • 54
0
votes
0 answers

axa-fr/react-oidc broke navigation to previous page after dependency displays internally page?

i got the auth up and running, but i have a problem when landing on a error page from the auth dependency (axa-fr/react-ocid). When landing on a dependency internal page (has no actual route) that shows the error, the navigation seems to break, but…
hsulso
  • 15
  • 5
0
votes
0 answers

With react-oidc-context, how can I remove authentication and tokens?

When the user logs out I call const auth = useAuth(); ... auth.clearStaleState(); auth.revokeTokens(); auth.removeUser(); However when the user attempts to reach a protected route they show as still authenticated and their tokens are still set.
dcp3450
  • 10,959
  • 23
  • 58
  • 110
0
votes
0 answers

oidc-react oidc-client-ts error on MacBookPro M1 Unhandled Promise Rejection: Error: No matching state found in storage

I use MacBook Pro m1 (on Windows everything is fine), issue occurs on safari, chrome, firefox. When I try to login I got this error "Unhandled Promise Rejection: Error: No matching state found in storage" my code: import React from 'react'; import…
0
votes
0 answers

ImproperlyConfigured at /oauth/authorize/ This application does not support signed tokens

I'm using django oauth toolkit. When my client react-oidc app makes request to the authority djangoapp_domain/oauth/authorize (In my case localhost:8000/oauth/authorize), I get the error: ImproperlyConfigured at /oauth/authorize/ This application…
0
votes
0 answers

React OIDC gives "Error Authentication" when sends post request to "/token" url

I'm using react oidc in my application. When I try to access the protected "/admin? url everything goes fine and I get "Authentication complete" screen but after some time the screen changes to "Error Authentication". It sends a request to /token…
0
votes
0 answers

React OIDC signinSilent() function causing a page refresh

Using oidc in react: import { useAuth } from "react-oidc-context"; //This is inside AuthProvider from react-oidc-context const MyComponent: React.FC = () => { const auth = useAuth(); …
Tyler Dahle
  • 817
  • 1
  • 8
  • 37
0
votes
1 answer

Using `react-oidc-context` ho do we remove the `grant_id` and `code` from the URL post login?

I have a SPA, which is protected using the PKCE authentication flow via the JavaScript library react-oidc-context. Once a user successfully authenticates, they are redirected back to the desired URL, except that react-oidc-context is adding two…
user1913559
  • 301
  • 1
  • 13
0
votes
1 answer

Revoke access token when user navigates away from SPA

I am developing SPA applications using ReactJS and the react-oidc-context library. All of these SPAs are OIDC-protected Wizards that the user closes/leaves once the wizard is complete. When the user closed/leaves the wizard, I want to revoke the…
user1913559
  • 301
  • 1
  • 13
0
votes
1 answer

How to add a nonce to react-oidc library?

I'm trying to figure out how to provide a nonce to my config file for the react-oidc library and when I click on the button to initiate a redirect, it's telling me that it's missing a nonce but I'm not sure how to provide one? My…
Jorden
  • 153
  • 1
  • 3
  • 16
0
votes
1 answer

Remove url parameters in react-oidc

I'm using AxaGuilDEv/react-oidc which is based on react-oidc package to login using oauth. The url called during signin has the following params by default : client_id, redirect_uri, response_type, scope, state, code_challenge,…
Dwix
  • 1,139
  • 3
  • 20
  • 45
-1
votes
3 answers

Oidc redirect to signin-callback.html

I'm stuck on this for the past few days. I'm having an issue authenticating with Oidc, I'm trying to redirect to a signin-callback.html after authentication but I'm unable to call an HTML page directly from my react app, during my research I've seen…
JoelE
  • 169
  • 3
  • 12