OAuth Implicit or Authorization Code with Unity3D and Photon Bolt?

Hello, i’m curently developping a small-scale (around 10 players at the same time) Unity multiplayer game to play with my Twitch stream viewers. The game is developped with Unity3D and Photon Bolt for the networking part, with an authoritative server build running locally on my computer (but hosted on Photon cloud) and the players playing on the Android or iOS app (client only).
I would like the players to log in with their Twitch account in order to identify them in the game through the Photon Bolt networking system.
After reading both these docs :
https://dev.twitch.tv/docs/authentication#:~:text=The%20domain%20dedicated%20to%20Twitch,%3A%2F%2Fid.twitch.tv.
https://doc.photonengine.com/en-us/bolt/current/connection-and-authentication/custom-authentication#photon_server____web_service
I’m not sure how to implement the twitch oAuth authentication and which would be the best code flow to use :

  • implicit code flow where when lauching the mobile app, the player has to log in with Twitch with an embedded webview page, and i then use the access token to fetch the user twitch id and display it with Photon Bolt
  • authorization code flow where the player log in with Twitch using the Photon custom server’s authentication provider sytem

I’m new to oauth2 and photon so any help will be appreciated

Thanks

If you are only authorizing in the client, then implicit. If you send that auth to your server then issue the user your own authentication systems token like a JWT then you want auth flow.