castweet.blogg.se

Discord login link
Discord login link









discord login link

This is because the endpoints it relies on are considered actively in development, and subject to change at any point. There's actually no public documentation on how Ghost creates members. Now we have a URI that can carry out the Discord Oauth flow to the point we have an end users data, let's move onto the Ghost side of things! We don't need to retain the token data for this use-case, so we don't keep that data. Userinfo += int(time.time())Īt the end of this function, we have the users identify payload, which includes the users email, as provided by the email Oauth scope. 'content-type':'application/x-www-form-urlencoded'Īuth = userinfo+' '+userinfo A basic Oauth handler is placed on this endpoint, as seen below: methods = ) This URI is part of an existing backend, operating via a Flask server. This is the page users are sent to when they carry out the Discord element of the Oauth flow. The next step is to cover the Redirect URI. Prompt is simply a true/false value to ask if the user should always see the auth screen, we set this to False. These are both needed to create a member on Ghost. The scopes we need are identify and email. When creating the Discord application, we get the Client ID. There are a few elements to an Oauth URL: From there we establish what we want the Oauth URL to be. Step zero to getting a Discord login working is creating an Oauth application on Discord. This article will detail how we got that button there, how it works and how we did some really cool stuff with Ghost's API to get it there. Ghost has no native support for creating memberships from third parties. If you're reading this, there's a decent chance you've clicked the button on the top right of this page to sign in with Discord.











Discord login link