question

John Adolfsson avatar image
John Adolfsson asked

Using external authentication API to validate Id from LoginWithCustomID,Setting up a connection to remote authentication for use with LoginWithCustomID

Hi

We have an already existing API hosted on our own servers, which we use for user authentication. We would like to allow users to authenticate and retrieve a token in-game from our own backend, and then call the Playfab API with LoginWithCustomID, using our session token as the CustomId.

How would I go about configuring our Playfab account so that it can use this token to validate against our backend? I have looked through the Cloudscript documentation, but as far as I can understand, it is intended for asynchronous events which will run after the LoginWithCustomID request has already returned to the client?

If I am misunderstanding how LoginWithCustomID is intended to be used, I would appreciate being corrected.

Authentication
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.

John Adolfsson avatar image John Adolfsson commented ·

I do not know why it concatenated a previous version of the title with the newest one, but it was not intentional

0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

I am not sure how the session token (from your server) work. Is it a persistent identity or a ticket that keeps changing every time?

However, I believe you may be interested in the new feature Server Custom ID, this is a server API that client is not able to access. If you are using latest SDK, you may find usage of server custom ID related APIs.

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.

John Adolfsson avatar image John Adolfsson commented ·

@SethDu The session token is only valid for a limited time, so a new one will be generated at each login. If the only option is to manually link the token every time it is generated, LoginWithCustomID is probably not what we need.

LoginWithServerCustomId sounds very useful for us though, we could expose our own login endpoint which the game can use. I will see if I can put together a solution with that. Thanks!

0 Likes 0 ·

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.