Identity Security for Games in C# with Unity

Takuto Ukawa

Dear Mr.Gamb,
I am following this page’s instruction, but I met troubles.
Please let me ask you two questions.

1. I followed the start to Native: Authenticate with Okta' and got SUCCESS on PC.<br> But in my Android mobile, APK emits error in Login() function. this is the logcat:<br> &gt; 11-06 17:55:53.771 30853 30878 E Unity : Exception: Home directory not found. The HOME environment variable is not set.<br> &gt; 11-06 17:55:53.771 30853 30878 E Unity : at Okta.Sdk.Abstractions.HomePath.GetHomePath () [0x00051] in &lt;989f14791eb247dca7e529bb4ee2d96c&gt;:0 <br> &gt; 11-06 17:55:53.771 30853 30878 E Unity : at Okta.Sdk.Abstractions.HomePath.Resolve (System.String[] pathSegments) [0x0001c] in &lt;989f14791eb247dca7e529bb4ee2d96c&gt;:0 <br> &gt; 11-06 17:55:53.771 30853 30878 E Unity : at Okta.Sdk.Abstractions.BaseOktaClient.GetConfigurationOrDefault (Okta.Sdk.Abstractions.Configuration.OktaClientConfiguration apiClientConfiguration) [0x00006] in &lt;989f14791eb247dca7e529bb4ee2d96c&gt;:0 <br> &gt; 11-06 17:55:53.771 30853 30878 E Unity : at Okta.Sdk.Abstractions.BaseOktaClient..ctor (Okta.Sdk.Abstractions.Configuration.OktaClientConfiguration apiClientConfiguration, System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILogger logger, Okta.Sdk.Abstractions.UserAgentBuilder userAgentBuilder, Okta.Sdk.Abstractions.AbstractResourceTypeResolverFactory resourceTypeResolverFactory) [0x00006] in &lt;989f14791eb247dca7e529bb4ee2d96c&gt;:0 <br> &gt; 11-06 17:55:53.771 30853 30878 E Unity : at Okta.Auth.Sdk.AuthenticationClient..ctor (Okta.Sdk.Abstractions.Configuration.OktaClientConfigu</p><p>2. Then I continued from OAuth_colon_ Authenticate with Okta’ and reached to
> Find the authorization endpoint, token endpoint, and userinfo endpoint urls,
I stucked because I cound not find userinfo_endpoint. (URL in JSON values were changed to avoid SPAM killer.)
> {“issuer”:“https_colon_slash_slash_dev-8117469.okta.com_slash_oauth2_slash_default”,“authorization_endpoint”:“https_colon_slash_slash_dev-8117469.okta.com_slash_oauth2_slash_default_slash_v1_slash_authorize”,“token_endpoint”:“https_colon_slash_slash_dev-8117469.okta.com_slash_oauth2_slash_default_slash_v1_slash_token”,“registration_endpoint”:“https_colon_slash_slash_dev-8117469.okta.com_slash_oauth2_slash_v1_slash_clients”,“jwks_uri”:“https_colon_slash_slash_dev-8117469.okta.com_slash_oauth2_slash_default_slash_v1_slash_keys”,“response_types_supported”:[“code”,“token”,“id_token”,“code id_token”,“code token”,“id_token token”,“code id_token token”],“response_modes_supported”:[“query”,“fragment”,“form_post”,“okta_post_message”],“grant_types_supported”:[“authorization_code”,“implicit”,“refresh_token”,“password”,“client_credentials”],“subject_types_supported”:[“public”],“scopes_supported”:[“openid”,“profile”,“email”,“address”,“phone”,“offline_access”],“token_endpoint_auth_methods_supported”:[“client_secret_basic”,“client_secret_post”,“client_secret_jwt”,“private_key_jwt”,“none”],“claims_supported”:[“ver”,“jti”,“iss”,“aud”,“iat”,“exp”,“cid”,“uid”,“scp”,“sub”],“code_challenge_methods_supported”:[“S256”],“introspection_endpoint”:“https_colon_slash_slash_dev-8117469.okta.com_slash_oauth2_slash_default_slash_v1_slash_introspect”,“introspection_endpoint_auth_methods_supported”:[“client_secret_basic”,“client_secret_post”,“client_secret_jwt”,“private_key_jwt”,“none”],“revocation_endpoint”:“https_colon_slash_slash_dev-8117469.okta.com_slash_oauth2_slash_default_slash_v1_slash_revoke”,“revocation_endpoint_auth_methods_supported”:[“client_secret_basic”,“client_secret_post”,“client_secret_jwt”,“private_key_jwt”,“none”],“end_session_endpoint”:“https_colon_slash_slash_dev-8117469.okta.com_slash_oauth2_slash_default_slash_v1_slash_logout”,“request_parameter_supported”:true,“request_object_signing_alg_values_supported”:[“HS256”,“HS384”,“HS512”,“RS256”,“RS384”,“RS512”,“ES256”,“ES384”,“ES512”]}

I would like to complete the instruction to make my own Android app. Any advices appreciated.
Thank you.