Hello Julian, great tutorial session! I had a few quick questions if you don't mind: 1. How do you handle session duration/lifetime? An issue I've found is that the token might expire but the middleware doesn't do anything about it, as the session is not tied to the token in any way. UseTokenLifetime seems to do nothing for it. 2. Do you think it might have anything to do with the order of the function calls between .AddOpenIdConnect and .AddCookie? 3. Do you find Controller usage imperative? I've been trying to think of a more MVVM solution but can't find any where you can have a common controller for the logout common button in the header. Thanks a lot!
Hi Julian, Excellent video. One question though, i have angular app and .Net 8 Rest API. In my case where will I implement Open Id Connect and Okta authentication logic i.e login, logout and middleware ? Will it be on Angular side or Rest API side ?
Curious, I haven't ever used a service that implemented Okta. Why are you suggesting it? I mean, is not popular, do you have any tutorial for Google OAuth?
hi, my @attribute [Authorize] isnt working correctly on a page. if I go do that page, it just directly redirect me to login via okta. I want it to show the stuff on tag we put in app. How do i do this?
Thanks Julian! Great tutorial. I fixed the "Unknown Location" error I was getting on Okta redirect by adding 2 more lines in the oidOptions: oidOptions.CorrelationCookie.SameSite = SameSiteMode.Unspecified; oidOptions.NonceCookie.SameSite = SameSiteMode.Unspecified; Hope this helps anyone with the same error.
Hi, I'm using an IdentityServer setup for SSO and followed these steps on how to configure the Blazor side. It works but I have some issues with the log out. I get logged out but redirected back to start page which logs me back in automatically. I have authorize requirement for all my pages. If I clear the cookies manually and refresh I get redirected and have to log in using my email/password. But the log out clears the cookie and then adds them directly without me having to enter my credentials, which seems odd. Any info is helpful :)
I triple checked everything, yet I get a 400 Bad Request from Okta when clicking on login. "Your request resulted in an error. The 'redirect_uri' parameter must be a Login redirect URI in the client app settings:" "Identity Provider: Unknown, Error Code: invalid_request"
Hello Julian, Great tutorial sessions you have here. Can you create a tutorial similar to this but for Blazor WASM using OKTA in .NET 6? I have implemented several approaches towards this goal but it doesn't work for me. The server side solution works, but it doesn't CDN services, which is why the WASM is important for me.
Hi thanks for feedback! I'll add your suggestion to the backlog, thank you! In the meantime, have you tried their website/yt channel ? They have exactly what you're asking. If you google 'okta blazor wasm', their post should be the first.
@@CodeWithJulian Hi, Yes you are correct I tried out the solution provided by Heather Downing, but it didn’t work for me. I got redirected to the OKTA login window but my authentication wasn’t successful and I was not able to see the CLAIMS page with all the details for a successful authorization. I got this error message “There was an error trying to log you in” I will wait for your solution once you are able to deliver it and thanks for the shared resource.
I'm getting the following error after following the tutorial InvalidOperationException: Provide Authority, MetadataAddress, Configuration, or ConfigurationManager to OpenIdConnectOptions Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions.Validate()
Hey wonderful human beings! Don't forget to like this video if you found it helpful 😎 Thanks!
Yay, new video!
Yes! Hope it's been helpful!
thank you for this video! Okta's example on line is .Net 3.1 and different than 6+
impressive tutorial, thank you Julian
Thank you very much. Really enjoyed this tutorial
Very well explained and easy to follow. Thank you.
Hello Julian, great tutorial session! I had a few quick questions if you don't mind:
1. How do you handle session duration/lifetime? An issue I've found is that the token might expire but the middleware doesn't do anything about it, as the session is not tied to the token in any way. UseTokenLifetime seems to do nothing for it.
2. Do you think it might have anything to do with the order of the function calls between .AddOpenIdConnect and .AddCookie?
3. Do you find Controller usage imperative? I've been trying to think of a more MVVM solution but can't find any where you can have a common controller for the logout common button in the header.
Thanks a lot!
Hi Julian, Excellent video. One question though, i have angular app and .Net 8 Rest API. In my case where will I implement Open Id Connect and Okta authentication logic i.e login, logout and middleware ? Will it be on Angular side or Rest API side ?
Did you get any update?
@@EnjoylittlethingsbyPurvi21 No reply from him and I did not get the time to check on other sites. Will reply if I have any..
Curious, I haven't ever used a service that implemented Okta.
Why are you suggesting it? I mean, is not popular, do you have any tutorial for Google OAuth?
thanks for the content man!
Always a pleasure!
Can you provide the same example with .net8. If you feel, there is no change, then please say, no change. we will use this step to implement.
Does okta honour authoriseview etc and all and does it provide an in app ui for managing user profiles? So they can reset passwords and such
Hey Julian, How we can do the single sign on (SSO) using okta in dotnet core ,
Thank you
Good one useful. Saml also as well
hi, my @attribute [Authorize] isnt working correctly on a page.
if I go do that page, it just directly redirect me to login via okta.
I want it to show the stuff on tag we put in app.
How do i do this?
Thanks Julian! Great tutorial.
I fixed the "Unknown Location" error I was getting on Okta redirect by adding 2 more lines in the oidOptions:
oidOptions.CorrelationCookie.SameSite = SameSiteMode.Unspecified;
oidOptions.NonceCookie.SameSite = SameSiteMode.Unspecified;
Hope this helps anyone with the same error.
Thanks! Nice spot!
The access token is null. How do I fix this?
Hi, I'm using an IdentityServer setup for SSO and followed these steps on how to configure the Blazor side. It works but I have some issues with the log out.
I get logged out but redirected back to start page which logs me back in automatically. I have authorize requirement for all my pages.
If I clear the cookies manually and refresh I get redirected and have to log in using my email/password.
But the log out clears the cookie and then adds them directly without me having to enter my credentials, which seems odd. Any info is helpful :)
I triple checked everything, yet I get a 400 Bad Request from Okta when clicking on login.
"Your request resulted in an error. The 'redirect_uri' parameter must be a Login redirect URI in the client app settings:"
"Identity Provider: Unknown, Error Code: invalid_request"
Nevermind, the issue was, that in Okta I had http instead of https. Works now.
Thanks for this. Any chance of covering refresh tokens with Okta in dotnet 6?
Hi yeah refresh tokens will be covered in the next video.
@@CodeWithJulian Amazing, thank you! Trying to get refresh tokens working in Blazor Webassembly but have been struggling.
tnx bro
You're welcome!
Hello Julian, Great tutorial sessions you have here. Can you create a tutorial similar to this but for Blazor WASM using OKTA in .NET 6?
I have implemented several approaches towards this goal but it doesn't work for me. The server side solution works, but it doesn't CDN services, which is why the WASM is important for me.
Hi thanks for feedback! I'll add your suggestion to the backlog, thank you! In the meantime, have you tried their website/yt channel ? They have exactly what you're asking. If you google 'okta blazor wasm', their post should be the first.
@@CodeWithJulian
Hi, Yes you are correct I tried out the solution provided by Heather Downing, but it didn’t work for me. I got redirected to the OKTA login window but my authentication wasn’t successful and I was not able to see the CLAIMS page with all the details for a successful authorization. I got this error message “There was an error trying to log you in”
I will wait for your solution once you are able to deliver it and thanks for the shared resource.
I'm getting the following error after following the tutorial
InvalidOperationException: Provide Authority, MetadataAddress, Configuration, or ConfigurationManager to OpenIdConnectOptions
Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions.Validate()
nevermind. I figured it out.
Nice one! 👍
I am gwtting the same error, what was the issue?