-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
omniauth user info is nil #43
Comments
Hi @LucasCioffi, you might check out (#42) where I've been rambling on about similar issues. I think your 1) might be standard Slack behavior. The first time a token is issued, you should get the Slack authorization chooser page, regardless of what scope you request. After that, for basic identity.xxxx scopes, oauth should pass right thru Slack without stopping. Number 2) is a tricky one, as there are different user-info api calls available to different scopes. I've tried to cover them all and balance efficiency with thoroughness in my fork of this gem. I'm curious to know if it helps others - or if it makes an awful mess 😜. I haven't put it up as a PR yet, so |
@ginjo That worked great. The auth hash had the right data in it. Thank you! Hopefully the gem maintainers can merge in this functionality down the road. |
I didn't try your fork, but have had some related issues. I also hope the maintainer (@kmrshntr?) will be able to sort through all the different PRs and update the gem; but this has been more than 4 months without any activity here, so might be time for an active fork to publish a new gem and start a new path from here? |
Glad it helped @LucasCioffi . @julienma , If you get a chance to try out my fork, let us know if it helps or breaks. I think it covers all the main issues, but my only feedback is from my own projects. Would be great to hear from @kmrshntr on what his thoughts are. I don't envy him having to sort thru all the PRs 😅 . EDIT: If you are trying out the ginjo fork of this gem (auth-hash-fixes branch, see above for gemfile code), make sure to |
@ginjo Hey, thanks for your branch. I used it and got this issue solved. Although now I am having an issue where I have this error
I am not sure if it is because I don't understand the slack oauth flow or something else, would you have any idea on how to tackle this? |
Hey @manuraj17, |
@ginjo Yes, the token was being requested another time. I could not get the master branch working due to the issue mentioned in this issue thread, user info being nil, so I was able to get it working only using your fork - thanks for that again. |
@manuraj17 no worries, glad you got it working! Let me know if see the issue happen again. |
oh! @ginjo thanks for your fork - helped me out. |
Thanks @ginjo ! |
🙏 @ginjo |
This is definitely something it'd be nice to permanently address. As @ginjo's fork is currently behind master I've shied away from using it, but for the moment I'm having to include @ginjo + @kmrshntr do we have an plans to bring the smarter profile retrieval into master? |
Hi all, @SirRawlins, My fork (ginjo) attempted to address all of the current scoping and data-retrieval issues at the time I created it. Unfortunately, I haven't brought it up to date with @kmrshntr 's master branch, yet. I'm not sure how well my fork would merge with master, as the varied contributors (myself included) have created differing solutions to the main issues. That said, it's not a huge amount of code, so it should be possible to work out the divergent solutions. I can take a look at it and see what's involved. If my fork has value for others, I'd be happy to bring it in line with master and offer up a proper PR. If anyone is curious about what I did, I left a rather thick documentation block inline with the code. It explains some of the sticky issues using omniauth with slack and how I approached solving those issues. The main takeaway is that I decouple information retrieval from requested scope. I retrieve as much information as possible at authorization time, regardless of what scope was requested for that authorization cycle. This works, because Slack's authorization tokens are persistent, with scopes being additive on any existing token. |
@ginjo thanks for getting back to me on this. I liked your approach as it had a fairly progressive approach, whereby it'd get as much personal information as possible given the scopes used. I'd be interested to hear from @kmrshntr about their long-term plans for the project, and what a successful PR to solve the issue would have to look like. |
Hi @ginjo I think your Thank you |
Sorry, my bad! I renamed my
I've also opened an issue in the ginjo fork to track some basic notes and documentation on the fork. |
Thanks for this gem!
I have two problems that might be related:
When logging into Slack, the user sees
[app name] would like access to your Slack team
but I wouldn't expect that message fromidentity.basic
.When I use Slack to authenticate and sign into my app, all user data is nil except for the token. I have
identity.basic
enabled as an app permission scope in Slack's admin interface the app. Is this an error or is this normal until the app is approved in Slack's app directory? Screenshot:The text was updated successfully, but these errors were encountered: