How get "OAuth Token" Twitch and Mixer?

Hi Support,

we are implementing a new site for games www.mvp-arena.com in PHP language and we have decided to use your fantastic plugin.
However, we need to further integrate the functionality of the Twitch and Mixer socials platforms.
For this reason, we need to retrieve the authentication "OAuth Token" after user login so that we can use it in the API calls of the Twitch and Mixer social platforms.
Is there any way to get this information using your wordpress plugin?

Thanks in advance

MVP-Arena Team

Answers

  • Claude_SchlesserClaude_SchlesserAdministratorOneAll Team

    Hello,

    yes after the login with a social network the full data is retrieved here:
    https://github.com/oneall/social-login-wordpress/blob/wordpress/3.0-5.0+/upload/oa-social-login/includes/communication.php#L44

    You could use this hook to store the data:
    http://docs.oneall.com/plugins/guide/social-login-wordpress/#3a

    Here a an example (untested):

    function oa_social_login_store_extended_data ($user_data, $identity)
    {
        if ($identity->provider == 'twitch')
        {
            update_user_meta ($user_data->ID, 'access_token', $identity->source->access_token_key);
        }
    }
    
    //This action is called whenever Social Login adds a new user
    add_action ('oa_social_login_action_after_user_insert', 'oa_social_login_store_extended_data', 10, 2);
    
  • To get an OAuth token for Twitch, first, register your application on the https://dev.twitch.tv/console by logging in, clicking "Applications," and filling out the necessary details like Name, OAuth Redirect URLs, and Category. After creating the application, you'll receive a Client ID and Client Secret.

    For Mixer (now known as Facebook Gaming), visit the Facebook for Developers site to register your application. Log in, create a new app, and complete the setup process. You'll then be provided with an App ID and App Secret. Use these credentials to follow the OAuth flow for obtaining an access token for authentication and accessing the platform's API.

  • Thanks for using our plugin! While the plugin supports basic OAuth login, retrieving the OAuth Token for platforms like Twitch and Mixer requires custom integration. You’d need to extend the plugin or use their respective APIs directly to obtain the token after user login. We recommend implementing a post-login hook to capture and store the token securely. If you're managing both game and industry content (e.g., globalsteelconstruction), ensure tokens are handled per platform-specific scopes and security standards.

  • Great guide! Getting an OAuth token can be tricky the first time, especially with platform changes over time. Thanks for simplifying the steps. By the way, if you're ever looking for durable protection for your vehicles, check out these Car parking Shade solutions – just like securing your API access, securing your car matters too!

  • With Worms Zone Mod APK no death mode, players can explore the map fearlessly and grow without worrying about losing progress. This feature makes the game highly engaging, allowing you to focus on strategy and worm growth. Unlock premium skins and experience uninterrupted gameplay where fun never stops, creating a more enjoyable and stress-free adventure.

  • Stick War Legacy Mod Apk allows you to enjoy unlimited gems, gold, and money. Players can unlock hidden features, customize armies, and play without limits. This version saves time and effort, giving more focus on fun battles. It’s a stress-free experience for those who want to explore the full potential of the game without restrictions.https://wormszonesapk.com/

  • Protecting homes from mice poop illness requires awareness and prevention. Mice feces can spread diseases through food contamination or airborne particles. Families can protect themselves by sealing cracks, storing food properly, and cleaning safely. Using gloves and disinfectants during cleanup helps avoid infection. Prevention and cleanliness are key to defending against mice-related illnesses.

  • The coffee section of the Mixue Menu adds a bold touch to its offerings. From iced americanos to creamy lattes, each cup is crafted for coffee lovers who crave quality at affordable prices. Whether you need an energizing start to your day or a relaxing drink with friends, Mixue coffee serves the perfect balance.

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.