How to authenticate EOS (Epic Online Services) users with UGS OpenID connect? #430
Unanswered
sampenguin
asked this question in
Integration Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I'm trying to authenticate Epic Games store users with my UGS setup for a Standalone_Windows build (UGS: Economy and CCD for addressables) This doc mentions using the OpenID api should work with EOS specifically. https://docs.unity.com/ugs/manual/authentication/manual/openid-connect
Currently I'm successfully authenticating with EOS directly from the Unity Editor using Persistent Auth mode, and seeing the correct ClientID and AccountID being reported in the editor log. However, when I then try to use that info to authenticate with UGS using Unity's API:
AuthenticationService.Instance.SignInWithOpenIdConnectAsync(openIDProviderName, Token);
it is failing with a message of:
[Authentication]: Request failed: 401, {"title":"PERMISSION_DENIED","detail":"validation failed","details":[],"status":401}, ...
I know the openIDProviderName is correct (matching on client and UGS Dashboard for identity providers) because I previously had that wrong and corrected it. But I don't know what I should be passing to this call as the Token from the EOS callback. I am currently passing an EpicAccountId called SelectedAccountId from the LoginCallbackInfo object, but clearly that's incorrect.
I don't see any other mention on EOS or Unity docs of what string to pass along as that token for OpenID to work... any suggestions?
Other relevant settings from UGS Dashboard:
Client ID: <Epic Dev Portal - Game Client ID>
OIDC Issuer (URL): https://api.epicgames.dev/epic/oauth/v1
Strangely the UGS portal doesn't ask for the client secret... should I be using the Product ID or Application ID from the Epic Dev Portal instead? Just stabbing in the dark here.
Beta Was this translation helpful? Give feedback.
All reactions