Skip to content
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

Setting authorize_params resource to https://outlook.office365.com/ breaks auth #6

Open
kaspth opened this issue Jun 16, 2015 · 1 comment
Assignees

Comments

@kaspth
Copy link

kaspth commented Jun 16, 2015

Hi @simi! I've been using your gem to integrate our app with office 365, and I really appreciate the work you're doing maintaining this ❤️

I have a small niggle though. In our app we want to access tokens for the Mail, Contacts and Calendar API at https://outlook.office365.com/ - mostly for https://outlook.office365.com/api/v1.0/me/messages - which means we have to pass that as the resource (otherwise we'll get tokens we can't use).
However, that breaks raw_info because there's no API at https://outlook.office365.com/Me?api_version=1.5. When raw_info breaks it takes the rest of the auth with it and all we get is an obtuse OAuth2::Error with no message.

I've fixed this in my app by switching raw_info back to what it was in your initial commit. Then I can pass option :authorize_params, resource: 'https://outlook.office365.com/' just fine and everything works.

I don't know exactly how to fix this here. But I'd definitely wish for more documentation (which I'll gladly help out with if you want).

Thanks again ❤️

Another point that I'd love to have documented is that the resource must end with a slash, otherwise raw_info is again broken because it will create a URL like .comMe?api_version=1.5, which you get an equally obtuse error from Net::HTTP for.

@simi simi self-assigned this Jun 23, 2015
@simi
Copy link
Owner

simi commented Sep 1, 2015

Hello @kaspth. Thanks for info. I'm going to review this and try to fix it. But I'm not sure if my Office365 account is still valid. Let me inspect first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants