Twitter Authentication

There is any way to do Twitter Authentication ?

@Kc-io You’re the first developer to request Twitter authentication support. :slight_smile:

We could add it to the game server as an official social provider but in the meantime the best approach is to use custom authentication and use a before hook to forward the Twitter token into a REST API call that you can use to validate it and exchange the token for a Twitter user ID and pass that ID onwards to complete the authentication call.

1 Like

Thanks.
yes i thought about it, then i think if i
used custom Id for twitter in future if i have to used any other Authentication then i don’t have any option left.
Also when you add this on your official feature, how i link my previous who’s account are created and linked with custom id with you official twitter feature.

When you add a feature of Twitter in your official Authentication then i have to upgrade server version ?

used custom Id for twitter in future if i have to used any other Authentication then i don’t have any option left.

@Kc-io Yep if you use Twitter for the custom authentication slot and want to use your own custom identity provider as well in the future you’d not be able to do so.

how i link my previous who’s account are created and linked with custom id with you official twitter feature.

You’d have to run a simple SQL query to migrate all the custom_id column data over to a new column that is part of the feature of the game server when and if Twitter authentication becomes officially supported. For example it would look something like:

UPDATE users AS u SET twitter_id = u.custom_id, custom_id = NULL;

The query above assumes a new column named "twitter_id" exists and that we’d want to migrate field for all users. (NOTE: This query doesn’t work but demonstrates what a small “logical migration” would look like.)

When you add a feature of Twitter in your official Authentication then i have to upgrade server version ?

Yes when (and if) we add official Twitter authentication to the list of social providers supported in the game server you’d have to update to a new release of the game server.

Thanks for your Detailed and satisfactory answer.

1 Like

@Kc-io Please open a feature request on the server for us to add Twitter Authentication: https://github.com/heroiclabs/nakama

If you can provide information like other games which use Twitter for authentication, or other details about why it would be attractive for players to use will help us with the feature prioritization.

Thanks :pray:

Done.

2 Likes