question

Mustafa Can Bolel avatar image
Mustafa Can Bolel asked

How To login with EOS using openid?

Hi, In epic dev portal a stuff said that login playfab with EOS is possible with openid. I have been researching and trying for couple of hours but couldn't managed to setup. These steps are result of my research:
1-I think Firstly I need to call "Create Open Id Connection" which inside the Admin API.

2-Then players can login to playfab with their EOS id token using "Login with Open Id Connect" call

I'm using Playfab unreal plugin and the plugin provides me "Create Open Id Connection" function.

To call this function. Firstly I created an actor and set my developer secret key with "Set play fab settings" function. Then I call "Create Open Id Connection". But it requires these request inputs to make the call:

-Client Id

-Client Secret

-Connection Id

-Issuer Discovery url (according to playfab docs this url is not required but if I left it blank, Call gives me an error and says the url must be defined)

How can I fill these infos? I put my eos product's client id and client secret. I put "EOS" for Connection Id. But "Issuer Discovery url" is a mystery. I put some random links for it (also tried with epic games' web link) but call respond give me an error message like this:

Internal Server Error. An unexpected error occured while processing the request.

Am I in the right way or wrong way? What should I do or what values should I put to these inputs?

Authentication
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JayZuo avatar image
JayZuo answered

Since you are using EOS, the Issuer Discovery url should be provided by Epic. I'm not familiar with Epic Online Services (EOS). After a quick search, I find this:

EAS authentication and authorization flow is compatible with OpenID Connect Core 1.0 and Discovery 1.0 specifications with minor extensions. EAS OpenID Provider Configuration is available at https://api.epicgames.dev/epic/oauth/v1/.well-known/openid-configuration.

So, the Issuer Discovery url should be "https://api.epicgames.dev/epic/oauth/v1/.well-known/openid-configuration".

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Greggory Addison avatar image Greggory Addison commented ·

I tried this but got this error. I visited the url myself and the json file is there so i'm not sure why it failed for me.

Unable to retrieve connection discovery data: "IDX20807: Unable to retrieve document from: 'https://api.epicgames.dev/epic/oauth/v1/.well-known/openid-configuration/'. HttpResponseMessage: 'StatusCode: 401, ReasonPhrase: 'Unauthorized', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers: { Date: Mon, 19 Sep 2022 06:51:43 GMT Connection: keep-alive X-Epic-Error-Code: 1032 X-Epic-Error-Name: errors.com.epicgames.common.authentication.authentication_failed Cache-Control: no-cache, no-store, no-transform X-Epic-Correlation-Id: 7b387d5a-97c3-413e-869e-9e0766ec0c05 Server: eos-gateway Content-Type: application/json; charset=utf-8 Content-Length: 342 }', HttpResponseMessage.Content: '{"errorCode":"errors.com.epicgames.common.authentication.authentication_failed","errorMessage":"Authentication failed for /api/epicid/v1/oauth/.well-known/openid-configuration/","messageVars":["/api/epicid/v1/oauth/.well-known/openid-configuration/"],"numericErrorCode":1032,"originatingService":"com.epicgames.account.admin","intent":"prod"}'.".
0 Likes 0 ·
Rick Chen avatar image
Rick Chen answered

The IssuerDiscoveryUrl is the discovery document URL to read issuer information from. This must be the absolute URL to the JSON OpenId Configuration document and must be accessible from the internet. If you don't know it, try your issuer URL followed by "/.well-known/openid-configuration". For example, if the issuer is https://example.com, try https://example.com/.well-known/openid-configuration. Please refer to this document for more info: Authentication - Create OpenId Connection - REST API (PlayFab Admin) | Microsoft Docs

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

giovannifrigo avatar image
giovannifrigo answered

I am a bit late to the party but since there's not much info here on the community I thought I'd add the configuration that's working for me here:

Connection ID: a name you can pick as identifier. For example, "EOS", "EpicOnlineServices", "Epic", .. This is needed to identify which OpenID connection to use when logging in from the game using LoginWithOpenIdConnectRequest.

Client ID: the client id of your Game client as configured in the Epic Store dev portal


Client secret: the client secret of your Game client as configured in the Epic Store dev portal


Issuer: set this to https://api.epicgames.dev/epic/oauth/v1. It will automatically look for the configuration under https://api.epicgames.dev/epic/oauth/v1/.well-known/openid-configuration.


Ignore nonce: leave this to unchecked

Hope this helps!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.