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

Blazor SPA PWA offline auth #21100

Closed
Eweol opened this issue Jan 3, 2021 · 2 comments
Closed

Blazor SPA PWA offline auth #21100

Eweol opened this issue Jan 3, 2021 · 2 comments

Comments

@Eweol
Copy link

Eweol commented Jan 3, 2021

[EDIT by guardrex to add the metadata. @Eweol ... Please in the future use the This page feedback button and form at the bottom of the topic to open an issue here.]

Hey guys,

I had a look hole 2 days to find a solution for my problem regarding offline authentication of a user in my Blazor Standalone PWA.

With .Net 5.0 I changed the Authentication scenario from Web to SPA.
After that change, my PWA was not able to login the user in offline mode.
I work on Program.cs with AddMsalAuthentication and save the tokens and ID's in local storage with help of MSAL.

If I'm online everything works like expected and I can login with the users and the tokens will be stored in local storage.
After changing the online state the PWA try to get the openid-configuration data from azure.
I tried to also serve this request with the service worker, which worked quiet fine but the token request after that fail also.

I searched and found the CarChecker app and the docs as well but this didn't solve my problem.
Did I missed something or is there really no way, to make offline auth workable on Blazor standalone PWA's?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@guardrex
Copy link
Collaborator

guardrex commented Jan 3, 2021

OOF for the 🎁 holidays

This issue has been marked for triage on the Blazor.Docs project, and I'll respond as soon as I return in 2021.

We only work on documentation on this repo. If you need product support, close this issue and seek assistance through one or more of the following support channels:

If you think that you found a potential bug in the framework or have product feedback, close this issue and open a new issue for the ASP.NET Core product unit at aspnet/AspNetCore issues.

For problems or feedback on Visual Studio or Visual Studio for Mac, close this issue and use the Report a Problem or Suggest a Feature processes from within VS, which open internal issues for the VS team. For more information, see Visual Studio feedback options or How to report a problem in Visual Studio for Mac.

For problems with Visual Studio Code, close this issue and ask for support on community support forums. For bug reports and product feedback, open an issue on the microsoft/vscode GitHub repo.

⛄🎁 Happy Holidays! 💃🕺🥳 Happy New Year! 🎈🍾🎉

@guardrex
Copy link
Collaborator

guardrex commented Jan 7, 2021

I'm back from vacation.

I haven't received any additional info from the product unit outside of what we have published at ...

https://docs.microsoft.com/en-us/aspnet/core/blazor/progressive-web-app?view=aspnetcore-5.0&tabs=visual-studio#interaction-with-authentication

There is an open issue that I'll follow-up on at ...

#20742

... that pertains to PWAs and auth. I don't think that it's the same problem, but you should look that over (and the product unit issue on it) to confirm that it's not related/helpful for your scenario.

I think if you're hitting problems with basic auth outside of the minimal doc coverage and in CarChecker, you have two courses of action that you can take. If you think the community can help out because others have developed PWA-auth apps successfully, especially CarChecker, you can hit up the community on the usual support channels ...

Second, you can ask the product unit directly by opening an issue on their repo with the problems/errors that you're seeing ...

https://github.com/dotnet/aspnetcore/issues

Of course, they'll need specifics ... error messages ... behaviors ... versions of everything in use ... and perhaps a small repro project that demonstrates the problem(s).

What I'll do for that doc section is give it my own go when I reach this topic for it's UE ("user experience") pass, which is when I'll be testing everything in the doc and updating/overhauling it, on #19286. I'll mark that tracking issue with a cross-link to this issue to remind me about your issue.

If you do open an issue for the product unit, please put a cc: @guardrex at the bottom of your opening comment so that I can follow the discussion.

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

No branches or pull requests

3 participants