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

set access_token when test_mode=true #60

Open
langalex opened this issue Jun 3, 2014 · 1 comment
Open

set access_token when test_mode=true #60

langalex opened this issue Jun 3, 2014 · 1 comment

Comments

@langalex
Copy link

langalex commented Jun 3, 2014

When not in test mode, after the callback phase I can call env['omniauth.strategy'].acces_token.get('/xyz') to make authenticated requests. In test mode access_token is not set as the normal callback phase code is never called.

At the moment I work around this in my tests using

OmniAuth.config.before_callback_phase = ->(env) {
  env['omniauth.strategy'].access_token = env['omniauth.strategy'].send(:build_access_token)
}

but it would be better if this was default behavior.

@isaacsanders
Copy link
Contributor

Care to submit a pull request for this? I would be happy to accept it.

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