问题
I am trying to reproduce something similar in my app. I only see things like OAuth where you can "login" with an external API and a new user will be created/authenticated with their third party credentials. Or alternatively some authorization flow where access tokens must be refreshed every hour or so. Discord, however, connects to these APIs and does not create or login a new user, they only access the user's data from that external API and presents it on the Discord GUI. Furthermore, as a user I never need to "refresh" my connection to these apps, as long as the choice is enabled I will see my information from the third party API. For example, Spotify- as long as I have the connection enabled I can see my Spotify activity. What is going on behind the scenes to enable this?
来源:https://stackoverflow.com/questions/63587360/how-does-discord-connect-to-third-party-apis