Skip to content

Instantly share code, notes, and snippets.

@explorer14
Last active August 24, 2020 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save explorer14/d28e429b0a01cbecaab3ed3afdb38d61 to your computer and use it in GitHub Desktop.
Save explorer14/d28e429b0a01cbecaab3ed3afdb38d61 to your computer and use it in GitHub Desktop.
@inherits LayoutComponentBase
<AuthorizeView>
<Authorized>
<div class="sidebar">
<!-- render auth sensitive views if user authenticated -->
</div>
</Authorized>
<NotAuthorized>
<div>
"Sorry!"
</div>
</NotAuthorized>
</AuthorizeView>
@code{
[CascadingParameter]
private Task<AuthenticationState> authenticationStateTask { get; set; }
//...other code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment