question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Oauth endpoints not created

See original GitHub issue

Description

I followed the documentation here, and I cannot seem to get the oauth module working as is specified. In the docs, it says it sets up the following endpoints:

  • slack/oauth_redirect
  • slack/install

However, it appears neither is actually configured. I followed the default config (subbing in my own configs, of course), and have yet to see it return anything other than a cannot GET... message. Am I perhaps doing something wrong? Are the docs out of date or perhaps showing for a future release? I would love some guidance here.

What type of issue is this? (place an x in one of the [ ])

  • bug?
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I’ve read and understood the Contributing guidelines and have done my best effort to follow them.
  • I’ve read and agree to the Code of Conduct.
  • I’ve searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

package version: 2.2.3

node version: 14.4

OS version(s): Linux pop-os 5.4.0-7634-generic #38~1592497129~20.04~9a1ea2e-Ubuntu SMP Fri Jun 19 22:43:37 UTC x86_64 x86_64 x86_64 GNU/Linux

Steps to reproduce:

  1. Follow the docs
  2. Attempt to set up redirect
  3. Try to use oauth to authenticate
  4. Cry 😢

Expected result:

Authentication to work

Actual result:

Great sadness

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
stevengillcommented, Aug 18, 2020

Are you defining your own receiver? If so, the OAuth options (clientId, clientSecret, stateSecrect, etc) need to be passed to ExpressReceiver instead.

const receiver = new ExpressReceiver({ 
  signingSecret: process.env.SLACK_SIGNING_SECRET 
  clientId: process.env.SLACK_CLIENT_ID,
  clientSecret: process.env.SLACK_CLIENT_SECRET
  stateSecret: 'my-state-secret',
  scopes: ['channels:read', 'groups:read', 'channels:manage', 'chat:write', 'incoming-webhook'],
  installationStore: {
    storeInstallation: async (installation) => {
      // change the line below so it saves to your database
      return await database.set(installation.team.id, installation);
    },
    fetchInstallation: async (InstallQuery) => {
      // change the line below so it fetches from your database
      return await database.get(InstallQuery.teamId);
    },
  },
});

const app = new App({
  receiver: receiver,
});


3reactions
jparr721commented, Aug 19, 2020

@stevengill That seems to have worked flawlessly, to anyone copying my config, I also had to remove the token field. Very sorry about this mistake, thanks so much for taking the time to review my error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth authorization endpoint not working
The KB explains a possible reason for an OAuth authorization endpoint not working.
Read more >
Understanding OAuth endpoints | Apigee Edge
Best practice: Create your own OAuth2 endpoint proxy ... The default oauth proxy is limited: it only supports the client credentials grant type....
Read more >
c# - OAuth - Does my Resource Server need the endpoints ...
With Application B, I am provided with a few API methods to validate a user, register user, get password, etc. I do not...
Read more >
OAuth Endpoints
A human readable description of the device used during login. This metadata is used to describe the refresh token that may be generated...
Read more >
[build-cop]No subsets found for the endpoints of oauth-server
"No subsets found for the endpoints of oauth-server" is usually transient error that occur when the SDN haven't provided IP subnet for the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found