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

Add new extension method that accepts a cookie manager. #183

Closed
wants to merge 1 commit into from

Conversation

hammypants
Copy link

@hammypants hammypants commented Oct 22, 2021

One cannot set the ICookieManager used by the underlying OpenIdConnectMiddleware. Instead of aborting out of the provided extension methods from Okta and referring to the source for partial reimplementation, just expose the ability to set it. Please see this reference from Microsoft.

I don't actually care if this gets merged, or if it is done in exactly this manner. I could not tell whether this way was preferable to exposing a new option, so I arbitrarily picked this one. This is just a non-API breaking example that fulfills my request.

If some way to expose the underlying ICookieManager is deemed out of scope or whatever, at the very least, some guidance in the documentation enlightening devs to implement their own extension methods or implementing Okta integration manually with OpenIdConnectMiddleware should be added.

I'm also doing this in part because doing a quick google search against the kinds of issues the reference above creates combined with the term "Okta" shows me a bunch of forum discussions where people are creating Session_Start() hacks and other things that make me yell "no!"

@bryanapellanes-okta
Copy link
Contributor

@hammypants,
Thanks for reaching out! We will review your request internally to determine how best to address your concern. We'll comment here when there's more.

Thanks for using Okta!

@laura-rodriguez
Copy link
Collaborator

Hi @hammypants,

Can you just use the CookieMiddleware provided by the framework and set your CookieManager before adding the Okta middleware? Something like this:

   app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                // ...
                CookieManager = new MyCookieManager()
            });

This is the approach that usually people follow. Let us know if this helps. Thank you!

@laura-rodriguez
Copy link
Collaborator

Closing due to lack of activity. Feel free to reopen if this is still an issue.

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

Successfully merging this pull request may close these issues.

3 participants