IdentityServer4 client configuration for React Native?

Viewed 28

I'm just getting started with React Native and .NET Core. How does IdentityServer4 client configuration for React Native be able to login? And how does React Native send the request ?

P/s: I'm using .NET Core 2.2, Oauth2.0

This my .NET Core 2.2:

  //App ReactNative
            new Client {
                ClientId = "ClientId",
                ClientName = "ClientName",
                AllowedGrantTypes = GrantTypes.DeviceFlow,
                RequireClientSecret = false,
                AllowOfflineAccess = true,
                RefreshTokenUsage = TokenUsage.OneTimeOnly,
                RefreshTokenExpiration = TokenExpiration.Sliding,
                RequireConsent = false,
                AllowedScopes =
                {
                    StandardScopes.OpenId,
                    StandardScopes.Profile,
                    StandardScopes.Email,
                    StandardScopes.OfflineAccess,
                    "pms_api"
                },
                    
             }

This my code React Native:

const IDENTITYS = {
clientId: 'ClientId',
client_secret: 'secret',
scope: 'pms_api openid profile email offlineaccess',
grant_type: 'client_credentials'

};

0 Answers
Related