Using plugin-api to link accounts
I am creating a bot which requires the user to link their discord account to their roblox account, both have oauth2 endpoints. I have thought about two methods for authenticating but I am not sure how to implement using plugin-api.
I will either generate a magic link that goes straight to roblox oauth, or have them log in with discord first and then roblox, but I am unsure how to redirect users once they go to a route. The only ways I can see the response being published is an error message, json, or plain text.
Do I need to use a frontend framework such as express or can I do this entirely on the backend as I do not intent do have a frontend web page.
1 Reply
Express is not a frontend framework, it's a backend api library. Note also the difference between framework and library.
And yes you need a frontend framework because with OAUTH2 your user needs to come back to a redirect url. That's not related to Roblox or discord in particular but just the OAUTH2 spec.
Even if you use a discord button with link style to send them off for Auth, you need to have them return somewhere with the Auth code to further authenticate them from the server