.NET 8 Core Web API Authentication in Maui App: Effortless User Login & Registration with Tokens! 🚀

preview_player
Показать описание

# Source code

# Playlist

# Here's a follow-up section to encourage engagement and support for Netcode-Hub:
🌟 Get in touch with Netcode-Hub! 📫

# ☕️ If you've found value in Netcode-Hub's work, consider supporting the channel with a coffee!

# Timestamps
0:00:00 🎬 Introduction
0:03:45 🛠️ Creating Projects
0:05:33 📦 Installing Packages to the API
0:08:19 📝 Creating Context Class
0:11:43 ⚙️ Configuring Opt-In API Endpoint
0:15:12 🗄️ Adding Database Migration
0:18:07 🚀 Running the API and Testing
0:20:05 📱 Adding Maui App Project
0:22:00 📦 Installing Packages to the Maui Project
0:24:14 🖥️ Configuring Android Emulator to Connect to Localhost
0:30:24 🔗 Creating Client Service with Its Models
0:39:54 🖼️ Creating Various Views with Their Respective ViewModels
1:01:50 ✅ Testing the App
Рекомендации по теме
Комментарии
Автор

Authorization would be a good follow on video from this.

parko
Автор

hi. can you please do a database-first approach next time? thanks, love the content!

jeremaine
Автор

Very helpful video, only thing I'm struggling to find is how you'd go about checking if the access token is still valid later on and using the refresh token instead.

samanson
Автор

Could you please make complete vedio on any application from scrach to publish in store using SQL Server and API's in .NET MAUI

wfxyizn
Автор

Quite good, but I have a problem. After I login an user, I want to return more than the token, how can I extend the response if the controllers are not being created in the WebAPI project?

dmzone
Автор

Great video!! Thank you so much for sharing your knowledge. One question would be: what if I do not use Identity? I mean, I use my own DB and my own logic for registering and login. When the MAUI app tries to login, the login endpoint should verify credentials and if suceeded, compute a refresh/access token manually and send back. Would be nice a video!!

predigr
Автор

Will this work for MAUI Hybrid Apps? Will it transfer tokens from XAML Pages to Blazor page?

CTRLALTF
Автор

I found this helpful but there does not appear to be any real security properly implemented here. What I mean is that the CLIENT has a bit of code to say isAuthenticated and only lets the weather API call to be done if the user has logged in, however your SERVER has no protection at all so *anyone* can call the API call regardless of whether they area logged in or not. This security example video would be great if security was implemented on the API. It would be great if you could update this video or provide a part 2 with security.. thats something I'd buy you a coffee for :) Do let me know if I'm missing something.

eaglescoutcoh
Автор

I might be missing something, but I can't see how you are protecting the WeatherForecast-endpoint. The only thing you are doing is hiding the button in the UI. The endpoint is still not protected. There is no verifying the token on the server side when the endpoint is called.

niclasblomquist
Автор

Thank you very much for this video, it is really awesome. What do I have to change so that I can use the service from Windows? In Windows I get "No service for type has been registered." Please can you post the Messagehandler, that i need?

volkerbusch
Автор

Would be great to see how Authentication will work on Maui Hybrid Apps.

CTRLALTF
Автор

Hey, thanks for the tutorial, how about for iphone?

rubencarreon
Автор

How do I implement API key authorization/storage between my API and MAUI app? I can still access the data by browser/postman through endpoints

louwrenspotgieter
Автор

Could you show us how to make a user management system in maui /maui blazor in net 8?

MihaiMoisei
Автор

I receive this error when I try to register an user: 'Object reference not set to an instance of an object.' The Swagger UI works fine, the error is in the MauiApp

rubencarreon
Автор

Cant seem to be able to reference the in the platform folder. Actually cant reference anyting I create in there

IvanRossouw
Автор

I have a doubt in .NET MAUI. I am creating a point-of-sale (POS) application in .NET MAUI for a Windows platform. I am using an entry field and a search bar in my application, and it needs to be in full-screen mode. I have converted the program into an executable (exe) file and ran it on a POS machine (Essae Machine). However, when I touch the entry field, the soft keyboard does not pop up. Interestingly, the soft keyboard works in Google Chrome and AnyDesk on the same POS machine. Can you help me understand why the soft keyboard is not popping up in my application?

muralid
Автор

How do you add and get the roles of a user?

MihaiMoisei
Автор

hi. can you please create video NET 8 Core Web API Authentication in Maui blazor

tofansahra-kbrv