Posts

Showing posts with the label oauth

OAuth Access Code working on Localhost but not working on server (e.g. nodechef)

OAuth Access Code working on Localhost but not working on server (e.g. nodechef) I'm developing a Web App using React and Meteor JS. On my localhost, I would call Patreon's Oauth API with a redirect link and after the user logs in and allows access to his profile, the user will be redirected to http://localhost:3000. From there I would get the access code from the URL and then make query calls to the API and it would work smoothly. Because it works, I decided to test it on a actual server like nodechef. To my surprise, after getting the code from the URL and using it to try to query the Patron OAuth paths via: var promise = patreonOAuthClient .getTokens(oauthGrantCode, redirectURL) var result = await promise.then(function(tokensResponse) { } ...... catch(function(err) { console.error('error!', err) }) I would get the following error on the server (nodechef) but not on my localhost server: error! Body { url: 'https://www...

Which oauth or openid-connect I need to choose in order to build a public sdk?

Which oauth or openid-connect I need to choose in order to build a public sdk? I am going to build an SDK for developers to access my backend restful resources. For example, I defined below restful apis: get GET /changes/changeId list GET /changes getStartPageToken GET /changes/startPageToken I need to secure my apis and I come across openid-connect, auth1 and auth2 but I am not sure which one I need to use. As far as I know, auth2 is more used to third-party authentication like login as google , facebook account etc. Is this right? google facebook In some other public APIs design, a developer need to register a developer account and get an app key and secret. They can use the key and secret to use their APIs. Which type of this authentication is it? Which one among them is more appropriate for my use case? Did you find an answer for this ? – Kavindu Dodanduwa 1 hour ago ...