-
Notifications
You must be signed in to change notification settings - Fork 16
Getting Started Login Page
Blazorade Teams needs a login page that is used together with Teams to perform interactive login in case tokens cannot be acquired silently. This can happen the first time a user logs in to the application. The login page is needed also if your application requires access tokens with scopes that the user has not yet consented to.
Don't worry, Blazorade Teams makes it super easy to create a login page.
First you need to add the page to your application. In Blazor, pages are located in the Pages
folder of your application.
When you have the page created, clear all of its contents, and add the following line on the top of the file.
@page "/login"
Note that this should be the same that you have configured as LoginUrl
in your Startup
class.
Then, add the rest of the code.
<LoginDialogHandler>
<p>
Hang on. We're logging you in. This will usually happen
only the first time you use the application, or when the
application needs you to consent to more permissions.
</p>
</LoginDialogHandler>
That completes your login page.