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

Added possibility to pass parameters to the authorize path. #99

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

akoenig
Copy link

@akoenig akoenig commented Oct 14, 2011

In my current project I need the opportunity to realise a "real twitter logout" which means that it is not enough to erase the session. The user has to login via twitter again if he would like to access the application.

I have seen that there is a "force_login=true" parameter for the "/oauth/authenticate" action in the Twitter API that forces the user to enter their credentials. Unfortunately, I did not find the possibility to add the params to the url, so that I've implemented a "authorizeParams" function in which you can put the params that will be appended to the authenticate url:

            everyauth
                .twitter
                .authorizeParams({force_login: true})

So in my case: If the user tries to login via: '/auth/twitter' he will be redirected to the twitter login page.

I hope that this is useful for someone.

@rishabhmhjn
Copy link

Is there any reason not to merge this PR?
It is necessary sometimes to be able to do something like force_login=true while logged in, or supporting multiple twitter logins.

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

Successfully merging this pull request may close these issues.

3 participants