question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow customisation of the Authenticating component [context]

See original GitHub issue

Issue and Steps to Reproduce

[I came across this issue in the context package. If it is an issue in the Redux package though I think the same applies]

Firstly, thank you very much for this component. I had started the work to do something similar myself, then found this library and decided you had done most of the hard work for me, so thank you for that 😃

I have spotted one or two issues however. You allow for customisation of the NotAuthenticated and NotAuthorized components, but not the Authenticating component.

This results in a flash of French text for me when I’m trying to protect a route, which isn’t what I would want in my application.

Versions

1.1.5

Screenshots

image

Expected

Allow the consumer to override the Authenticating component via an authenticating prop on the AuthenticationProvider.

The example I looked at was for the context API, but I think this would need to be changed for all packages.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
guillaumechervetaxacommented, Feb 23, 2019

Awesome! thank you, I will need to check it out on my computer tomorrow (I have just my phone for now), as soon as it is merged I can deploy a new version on npm if you need it.

0reactions
this-fifocommented, Feb 22, 2021

hey @guillaumechervetaxa , thanks a lot for this incredibly helpful library, I’m having this exact same issue and the authenticating overriding is not working for me I still get the french default message, was this fix possibly lost after the big refactor?

my configuration is the following:

<AuthenticationProvider
    isEnabled
    configuration={configuration}
    authenticating={() => (
        <Text>Authenticating, please wait ...</Text>
    )}
>

and then in my router

<Route
    path="/users"
    component={withOidcSecure(ManageUsers)}
/>

I’m using @axa-fr/react-oidc-context version ^3.1.6

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling Authentication in React with Context and Hooks
With Context, it becomes easier to access props in different components, without having to pass them down on each level explicitly.
Read more >
Predictable React authentication with the Context API
First, let's create two page components, one for signing up users and another for login. SignUpPage/index.tsx. import React, { FormEvent } ...
Read more >
MERN Authentication Tutorial #8 - React Auth Context
Get the full course now (without ads) on the Net Ninja Pro site:https://netninja.dev/p/mern-auth-tutorial/ Get access to all free ...
Read more >
React User Login Authentication using useContext and ...
Use context is a hook that allows us pass data to multiple components without prop drilling. UseContext allows us read the current value ......
Read more >
React Auth Hook - Context API and useReducer
Create a custom hook to implement a better version of authentication in React and expose methods to update the provider just like MSAL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found