Created
April 8, 2020 03:05
-
-
Save mrnkr/0fe8d39b89ce6e398dfc9b770dc8fa2d to your computer and use it in GitHub Desktop.
This is how to configure JwtBearer authentication in C# to use a firebase id token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services | |
.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) | |
.AddJwtBearer(options => | |
{ | |
options.Authority = "https://securetoken.google.com/firebase-project"; | |
options.TokenValidationParameters = new TokenValidationParameters | |
{ | |
ValidateIssuer = true, | |
ValidIssuer = "https://securetoken.google.com/firebase-project", | |
ValidateAudience = true, | |
ValidAudience = "firebase-project", | |
ValidateLifetime = true | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment