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

Does react-oidc support RFC 8707 (Resource indicator) #937

Open
Annouar opened this issue Jan 12, 2023 · 9 comments
Open

Does react-oidc support RFC 8707 (Resource indicator) #937

Annouar opened this issue Jan 12, 2023 · 9 comments

Comments

@Annouar
Copy link

Annouar commented Jan 12, 2023

Issue and Steps to Reproduce

Hello everyone !
Thanks for this useful library !

I was wondering if the lib does support the Resource Indicator parameter (RFC 8707), or if it's planned to support it ?
I was looking for the information, but I did not find any reference to that kind of parameter in code or in documentation.

Thanks a lot :)
Annouar

Versions

6.13.1

@guillaume-chervet
Copy link
Contributor

guillaume-chervet commented Jan 12, 2023

hi @Annouar ,
Thank you for your issue I did not know about (RFC 8707)

It should already work with one resource with that kind of configuration using extras parameter:

const configuration = {
  client_id: 'interactive.public.short',
  redirect_uri: window.location.origin + '/authentication/callback',
  silent_redirect_uri: window.location.origin + '/authentication/silent-callback', // Optional activate silent-signin that use cookies between OIDC server and client javascript to restore the session
  scope: 'openid profile email api offline_access',
  authority: 'https://demo.duendesoftware.com',
  service_worker_relative_url:'/OidcServiceWorker.js',
  service_worker_only:true,
  extras:{
	'resource:token_request': 'https://www.guillaume-chervet.fr'
	resource: 'https://www.guillaume-chervet.fr'
  }
};

I have to make an evolution ta make possible to add multiple resources. May be like:

const configuration = {
  client_id: 'interactive.public.short',
  redirect_uri: window.location.origin + '/authentication/callback',
  silent_redirect_uri: window.location.origin + '/authentication/silent-callback', // Optional activate silent-signin that use cookies between OIDC server and client javascript to restore the session
  scope: 'openid profile email api offline_access',
  authority: 'https://demo.duendesoftware.com',
  service_worker_relative_url:'/OidcServiceWorker.js',
  service_worker_only:true,
  extras:{
	'resource:token_request': 'https://www.guillaume-chervet.fr/toto,https://www.guillaume-chervet.fr/youhou'
	resource: 'https://www.guillaume-chervet.fr/toto,https://www.guillaume-chervet.fr/youhou'
  }
};

@guillaume-chervet
Copy link
Contributor

Oh, I haven't seen it require to remove scope parameter. I may have to make some évolution.

@Annouar
Copy link
Author

Annouar commented Jan 18, 2023

Hey @guillaume-chervet !
Thanks a lot for the extras field usage, it works well with my single resource usecase !

To be honest, I am super interested in the evolution to make possible adding multiple resources. What about pass the resources as an array ?

I was also wondering the way we need to programmatically renewToken for a single resource (managing the access_token for each resources).

Anyway, if you need some help for the testing the feature, feel free to ask ;)

@guillaume-chervet
Copy link
Contributor

Thank you @Annouar ,
I think I can implement it in few weeks :)

guillaume-chervet added a commit that referenced this issue Feb 1, 2023
Many reason why :

- appauthjs code is complexe for few feature
- it will be easier to setup simple unit test
- appauthjs prevent to set up fast new oidc and oauth feature le Does react-oidc support RFC 8707 (Resource indicator) #937
- ligther bundle
- it will be easier to clean the code and i need to
- I want to ask openid for a certification
- and also for security i want to hide codeverifier from client inside serviceworker, it will be unretrivable from the client
@Annouar
Copy link
Author

Annouar commented Feb 14, 2023

Hey @guillaume-chervet !

Hope you're well !
I was wondering if you need any kind of help in order to help you implement multiple resources feature on repo :)

Feel free to ask !
Regards,
A.

@guillaume-chervet
Copy link
Contributor

Hi @Annouar , i will try to implement it tomorrow. I would like some help to test it, i havent oidc server configured with this available. Which oidc server do you use?

@guillaume-chervet
Copy link
Contributor

Sorry @Annouar , i did not get the time to do it. I think it is simple to do now (few line of code).
I am in holiday the next week, i will try to do it as soon as i am back.

@Annouar
Copy link
Author

Annouar commented Feb 23, 2023

Hey @guillaume-chervet,

Sorry, I've missed your previous message !
Thanks a lot for your work, and let me know if you need I test someting. Indeed, unfortunaly, I can't share the oidc server I use for security reasons :(

Enjoy your holidays !

@guillaume-chervet
Copy link
Contributor

Sorry @Annouar ,

I'am still on the subject, I do not forget your need.

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

No branches or pull requests

2 participants