bolt-js icon indicating copy to clipboard operation
bolt-js copied to clipboard

Customise HTML for "slack/oauth_redirect" page

Open j1mie opened this issue 2 years ago • 1 comments

Description

Similar to #982 is there a way to change the HTML for the "/slack/oauth_redirect" page? It current displays a page without styling, it would be great to have a way to customise this.

Screenshot 2022-08-30 at 14 10 06

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

  • [ ] bug
  • [ ] enhancement (feature request)
  • [x] question
  • [ ] documentation related
  • [ ] example code related
  • [ ] testing related
  • [ ] discussion

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

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

j1mie avatar Aug 30 '22 13:08 j1mie

Hey @j1mie !

This is possible, though kind of difficult to figure out from our docs - it is buried deep!

Check out the bolt-js docs on Authenticating with OAuth, scroll down to the bottom of this section where there is a collapsed "Customizing OAuth defaults". Expand this section and check out some of the options (as well as the example alongside the content). What you want to specify is installerOptions.callbackOptions.success or installerOptions.callbackOptions.successAsync. This lets you define a custom successful-oauth-redirect handler. This handler gets access to a res parameter - which is the HTTP response that controls what the user sees at the end of the OAuth redirect. These are all features of the underlying @slack/oauth package.

Some links that may be helpful:

Hope that's helpful.

Cheers!

filmaj avatar Aug 30 '22 15:08 filmaj

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

github-actions[bot] avatar Oct 03 '22 00:10 github-actions[bot]

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.

github-actions[bot] avatar Oct 17 '22 00:10 github-actions[bot]

Thanks @filmaj! Just used your suggestion and worked great 🎉

philwhln avatar May 23 '24 18:05 philwhln