Git Product home page Git Product logo

mitchelsellers / dotnet-maui-blazor-customauthentication-sample Goto Github PK

View Code? Open in Web Editor NEW
41.0 6.0 17.0 277 KB

This is a demonstration project supporting a blog posting about authentication in .NET MAUI Blazor Hybrid

Home Page: https://mitchelsellers.com/blog/article/net-maui-blazor-hybrid-custom-authentication-implementation

License: MIT License

C# 39.90% HTML 38.97% CSS 21.13%
dotnet-core maui maui-blazor blazor authentication samples

dotnet-maui-blazor-customauthentication-sample's Introduction

.NET MAUI Blazor Hybrid - Custom Authentication Sample

This is a demonstration project supporting a blog posting discussing custom authentication in .NET MAUI Blazor Hybrid applications.

Disclaimer

This project is currently built upon the Preview 14 version of .NET MAUI and all items included in here are subject to change, and could no-longer function in later preview releases or final releases of MAUI/Blazor. Additionally, this is a sample implementation, and might need further rigorous testing implementations to 100% validate security, so please use at your discretion.

Solution Goal

The goal of this example is to showcase how you can implement custom authentication within an .NET MAUI Blazor Hybrid application in a manner where you can authenticate a user via an alternative means, other than Azure AD or OAuth and work using the built in authentication controls & processes for your MAUI application.

Installation Assumptions

To utilize this sample project you must be running Visual Studio 2022 Preview 2.1 (17.2.0 Preview 2.1), or possibly later, with the .NET MAUI features installed.

I will update this as future releases occur.

Repository structure

For ease of use, the project initially contains 2 commits.

  1. Initial source code from project creation using the Visual Studio Templates
  2. A secondary commit with all custom authentication bits included. This includes securing of all sample pages, and the addition of a new login screen.

dotnet-maui-blazor-customauthentication-sample's People

Contributors

mitchelsellers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dotnet-maui-blazor-customauthentication-sample's Issues

Where is Auth0 configs and call?

I came across you article while following the Maui native article for Auth0. However, I don't see how to take your code and call Auth0? Thanks

Java errors build time

Trying to run this with latest VS2022 Preview and getting this error. Not sure if it is related to my config or SDKs or similar having changed since the sample was made but seems perhaps more like a tooling error

Severity Code Description Project File Line Suppression State
Error XA5301 Failed to generate Java type for class: AndroidX.Core.View.Accessibility.AccessibilityManagerCompat/IAccessibilityStateChangeListenerImplementor due to MAX_PATH: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users******\source\repos\dotnet-maui-blazor-customauthentication-sample\src\SampleMauiApplication\obj\Debug\net6.0-android\android\src\mono\androidx\core\view\accessibility\AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.java'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at Microsoft.Android.Build.Tasks.Files.CopyIfStreamChanged(Stream stream, String destination) in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/Files.cs:line 170
at Xamarin.Android.Tasks.GenerateJavaStubs.CreateJavaSources(IEnumerable`1 javaTypes, TypeDefinitionCache cache) SampleMauiApplication C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets 1438

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.