DEV Community

Discussion on: Setting up an Authorization Server with OpenIddict - Part II - Create ASPNET project

Collapse
 
lefty profile image
Jeffrey Hartmann

I needed to change the definition of ReturnUrl in LoginViewModel to be nullable in order for the ModelState to be valid if a ReturnUrl wasn't supplied.

        public string? ReturnUrl { get; set; }
Enter fullscreen mode Exit fullscreen mode
Collapse
 
chrlol profile image
Chrlol • Edited

Or you can remove
< Nullable >enable</ Nullable >
from the csproj file

Collapse
 
luisapplivity profile image
LuisApplivity

@chrlol And in case one day the csproj default ever changes, we can ensure we still keep this disabled with...:

<Nullable>disable</Nullable>

... instead.