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.

  • Hi MVP-Arena Team,

    Thanks for reaching out! To retrieve the OAuth Token for Twitch and Mixer, you’ll likely need to integrate their APIs directly. Unfortunately, the plugin doesn’t handle this functionality directly.

  • While working on OAuth tokens for Twitch and Mixer, why not take a break and explore the Worms Zone Mod APK? https://wormzoneapk.com/ This modified version enhances your gaming experience with unlimited coins, unlocked skins, and ad-free gameplay. It's a fun way to recharge and return to development tasks with fresh energy!

  • Experienced gamers will appreciate Android game Rally Fury Mod APK for its competitive features and challenging gameplay. The unlocked cars and tracks offer plenty of opportunities for skillful racing and high-speed thrills.

  • Phill_JonesPhill_JonesMember
    edited January 22

    Crunchyroll Mod APK provides anime enthusiasts with an enhanced viewing experience, unlocking premium features without the need for a subscription. This modified version grants access to ad-free streaming, offline downloads, and a vast library of popular anime series and movies. With its user-friendly interface and high-quality video playback, it's a go-to choice for fans seeking uninterrupted entertainment.

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.