Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: replace oidc-client-js with oidc-client-ts #860

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

miestr
Copy link
Contributor

@miestr miestr commented Jul 15, 2022

fixes #652

@miestr miestr mentioned this pull request Jul 15, 2022
Copy link
Member

@simenandre simenandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for this contribution!

It's safe to assume that this is the best approach going forward. I am, since this is a large step for us going to propose that we release this a breaking change and ask @braaar and @ryancole to have a look.

@@ -142,7 +142,7 @@ export const AuthProvider: FC<PropsWithChildren<AuthProviderProps>> = ({
return (
<AuthContext.Provider
value={{
signIn: async (args: unknown): Promise<void> => {
signIn: async (args: any): Promise<void> => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure we want to use any here? If the args are not know, they should probably stay unknown. It would however be nicer to have some types here, is that something oidc-client-ts now provides?

Comment on lines +53 to +56
authority: authority || '',
client_id: clientId || '',
client_secret: clientSecret,
redirect_uri: redirectUri,
redirect_uri: redirectUri || '',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these being defaulted to an empty string? It's been a while since I worked with this code base, so I'm a bit rusty 😅

@@ -87,7 +87,7 @@ export interface AuthProviderProps {
*
* defaults to 'location=no,toolbar=no,width=500,height=500,left=100,top=100'
*/
popupWindowFeatures?: string;
popupWindowFeatures?: PopupWindowFeatures;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a union now?

@simenandre simenandre changed the title upgrade from oidc-client-js to oidc-client-ts refactor!: upgrade from oidc-client-js to oidc-client-ts Jul 15, 2022
@simenandre simenandre changed the title refactor!: upgrade from oidc-client-js to oidc-client-ts refactor!: replace oidc-client-js with oidc-client-ts Jul 15, 2022
@simenandre
Copy link
Member

I am, since this is a large step for us going to propose that we release this a breaking change

I just realized we already have a pending v2 release

This was referenced Jul 15, 2022
@ryancole
Copy link
Contributor

I think this would be a good migration to make for oidc-react.

We moved to MSAL recently. It's maintained by Microsoft and is finally recently compatible with IdentityServer. Once I saw oidc-client dying off I started looking for alternatives.

With that said, I probably won't be paying close attention to patches for oidc-react. Don't wait for me to approve anything - I'll be slow to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IdentityModel/oidc-client-js is deprecated
3 participants