Questions tagged [simple-oauth2]

A simple Node.js client library for Oauth2.

A simple Node.js client library for Oauth2.

11 questions
3
votes
1 answer

How to get rid of 400 bad request error in simple-oauth2 getToken method?

I am trying to create an application where i want to fetch Outlook mails. I am using using simple OAuth 2.0 for the access token. I am successfully getting the code. When I am trying to get the access token in exchange of code I am getting 400 bad…
Swastik
  • 499
  • 1
  • 4
  • 10
2
votes
1 answer

Redirect URI from this request does not match one from the authorize request even though they're the same

So I am using ORY/Hydra to host an OAuth 2.0 Server and am in the process of building a sample client to demonstrate the flow. I call the /oauth2/auth endpoint with the redirect_uri in the query params, and I use simple-oauth2 to later call…
Haardik
  • 187
  • 1
  • 13
1
vote
0 answers

Unable to exchange auth-code to get access-token using Microsoft identity platform in my node application

I am implementing OAuth2 using Microsoft identity platform. For this purpose, I registered my app to Azure Active Directory admin center and got an app-id and other app credentials. Redirect-url also mentioned as well. So first of all, I generated…
Adam Ch.
  • 163
  • 1
  • 13
1
vote
1 answer

OAuth2 fails to return auth token using simple-oauth2 and Firebase Functions for Spotify Authentication

I have been working on a oauth2 flow for spotify by following this similar tutorial by the Firebase team for Instagram HERE I am able to submit my credentials and return the user code and state in the url, but when I run the method to submit the…
Jordan Lewallen
  • 1,681
  • 19
  • 54
1
vote
4 answers

await is a reserved word error in ReactJS

I'm new to ReactJS and I have used simple-oauth to connect to a test API. I have added the client id, client secret, username and password as well as the oauth token url. I'm getting syntax error await is a reserved word (40:21) Below is my current…
1
vote
0 answers

Express Js using simple-oauth2 to access Microsoft Graph, possible proxy issue?

I have been following the tutorial posted here https://learn.microsoft.com/en-us/outlook/rest/node-tutorial to teach me how to access the Microsoft Graph API. I have been working on my project at home and at work, and while the example works…
1
vote
0 answers

Heroku H18 error with Microsoft OAuth 2.0

I am trying to build a simple OAuth 2.0 authentication flow for Microsoft/outlook ID. I have tested the flow on localhost everything seems to be working in that. But when I deploy the APP to Heroku with new Microsoft app credentials and RedirectURI…
0
votes
1 answer

Can simple-oauth2 support multiple oauth transactions simultaneously?

I want to use simple-oauth2 in a node.js application to facilitate login to my service. Do I need to instantiate an instance for each user that is actively logging in ( using oauth2module.create() ) or can I reuse a single global instance for…
gambitx28
  • 151
  • 1
  • 9
0
votes
1 answer

simple-oauth2 throws "The content-type is not JSON compatible" on token refresh

I'm using simple-oauth2 in this example to query Microsoft Graph. All works well so far. But when I try to refresh the access token var newToken = await storedToken.refresh();, I get an error: The content-type is not JSON compatible This is thrown…
kcode
  • 1,220
  • 1
  • 18
  • 34
0
votes
1 answer

Embed Outlook.com with especific credential user generated by MS Graph access_token

I can login to Outlook 365 in my web with MS Graph without user action. I'm using simple-oauth2 module and oauth2.ownerPassword.getToken method to generate tokens with username/password from my database. I'd like embed Outlook.com in my web for each…
MAL
  • 143
  • 1
  • 14
0
votes
0 answers

simple-ouath2 Error getting token [object Object]

I'm trying to use Outlook's API and I'm using simple-oauth2 to authorize permissions. I'm grabbing snippets from Microsofts Doc's but I get the following error: Error getting token [object Object] ... TypeError: Cannot read property 'send' of null…
user7496931