Reputation: 2631
I am creating an Authentication Server using IdentityServer4.
I am creating a client that will be accessed using Resource Owner Password Credentials.
But I am wondering what should be the client_id and client_secret.
Should the client_id be a human-readable name of the client for e.g. app name or it should be a random number or string?
The client_secret is a string but what should be its value? A UUID? a random string? base64 string?
I went through IdentityServer4 and OpenId documentation but could not find any guidance.
Here's the example they have provided in their docs.
new Client
{
ClientId = "client",
// no interactive user, use the clientid/secret for authentication
AllowedGrantTypes = GrantTypes.ClientCredentials,
// secret for authentication
ClientSecrets =
{
new Secret("secret".Sha256())
},
// scopes that client has access to
AllowedScopes = { "api1" }
}
As you can see in the example, they have set up a human-friendly client_id.
Upvotes: 0
Views: 1628
Reputation: 2394
Github: 6779ef20e75817b79602
Google: 292085223830.apps.googleusercontent.com
Instagram: f2a1ed52710d4533bde25be6da03b6e3
Windows Live: 00000000400ECB04
Read more about secrets for IdentityServer4 here
Upvotes: 1