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

Apply omniauth #133

Merged
merged 5 commits into from
Feb 13, 2013
Merged

Apply omniauth #133

merged 5 commits into from
Feb 13, 2013

Conversation

xdite
Copy link
Contributor

@xdite xdite commented Feb 12, 2013

  • use omniauth-openid to replace handcraft openid
  • make openid login much easy to maitain
  • use omniauth-facebook to replace handcraft facebook-auth
  • use omniauth-twitter to replace handcraft twitter-auth

@SamSaffron
Copy link
Member

note, the redis point is kind of critical for us as we are hosted on multiple machines, I am pretty sure we have some prd bugs now due to redis missing.

@SamSaffron
Copy link
Member

Is there any way we can add tests for any of this, I really worry about regressions and the original was so poorly tested (ie as in not tested at all)

@xdite
Copy link
Contributor Author

xdite commented Feb 12, 2013

Here are some resources

I may add it tomorrow. cause I am in Chinese vacation now...

@SamSaffron
Copy link
Member

no worries, btw, now that you added omni auth some future idea

1- clean it up so both facebook and twitter go via omniauth
2- add a site setting for github auth (with the UI) we would like to enable that on meta

Appreciate all the good work, thank you

@xdite
Copy link
Contributor Author

xdite commented Feb 12, 2013

no problem.

And just curious about why would you use handcraft authentication system instead devise ?
https://github.com/plataformatec/devise

@xdite
Copy link
Contributor Author

xdite commented Feb 12, 2013

Facebook wouldn't let unconfirmed user to login 3rd party app http://d.pr/i/eG8J
It's no need to implement check user is verified or not

@xdite
Copy link
Contributor Author

xdite commented Feb 12, 2013

facebook & twitter are already moved to users/omniauth_callbacks

@ghost ghost assigned SamSaffron Feb 12, 2013
@xdite
Copy link
Contributor Author

xdite commented Feb 12, 2013

hit a problem, when I use js: true in rspec. It's keep popup

     Failure/Error: Unable to find matching line from backtrace
     RuntimeError:
       eventmachine not initialized: evma_install_oneshot_timer

:/

@SamSaffron
Copy link
Member

pr can't be merged anymore, also, can you rebase / squash commit ? are you running under thin, we have a fairly strong EM dependency

@xdite
Copy link
Contributor Author

xdite commented Feb 13, 2013

I already squash the commit and rebase the master

@SamSaffron
Copy link
Member

Still seeing, OpenID::Store::Filesystem.new can you use a RedisStore ?

@xdite
Copy link
Contributor Author

xdite commented Feb 13, 2013

done

@SamSaffron
Copy link
Member

I approve of this PR @eviltrout .. only thing is its a bit late now and we need to watch stuff shortly after its deployed for a few hours, can you pull / deploy in your AM ?

eviltrout added a commit that referenced this pull request Feb 13, 2013
@eviltrout eviltrout merged commit afc23cc into discourse:master Feb 13, 2013
@eviltrout
Copy link
Contributor

Merged, I'll test on our test environment before deploying to production later today.

@eviltrout
Copy link
Contributor

Also thanks a lot @xdite 🐟

@blowmage
Copy link
Contributor

👍 OmniAuth will allow for easier integration to other systems, like a corporate LDAP. Thanks @xdite.

@SamSaffron
Copy link
Member

@xdite
Copy link
Contributor Author

xdite commented Feb 13, 2013

Ah. I forget to change. This value is for dev only.
but in production we should use our own CA

http://stackoverflow.com/questions/6756460/openssl-error-using-omniauth-specified-ssl-path-but-didnt-work

@xdite
Copy link
Contributor Author

xdite commented Feb 13, 2013

related discussion omniauth/omniauth#404

@SamSaffron
Copy link
Member

can you put a PR in place that with a comment and if Rails.env == 'development' protecting us there?

@blowmage
Copy link
Contributor

do_something_bad if Rails.env.development?

@SamSaffron
Copy link
Member

I guess, maybe just leave it all commented out for now with some pointers to tricks needed to test this

@SamSaffron
Copy link
Member

cleaned it up here: 4ccb735

@naggie
Copy link

naggie commented Jun 18, 2013

Was LDAP support ever enabled? http://meta.discourse.org/t/ldap-support/974

brucellino pushed a commit to AAROC/discourse that referenced this pull request May 15, 2015
CvX pushed a commit that referenced this pull request May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants