mit-teaching-systems-lab / discourse-edx-lti

Discourse plugin for using Discourse as a discussion forum in EdX courses
http://tsl.mit.edu
MIT License
22 stars 6 forks source link

Change authenticator to User.new to work around login/sign up combinations #3

Closed kevinrobinson closed 7 years ago

kevinrobinson commented 7 years ago

As far as I can tell, there's no clear way to restrict access, not allow new users to sign up, but allow new users to come in through an AuthProvider without approval or any other confirmation.

Login settings:

screen shot 2017-02-01 at 2 04 54 pm

This change looks up or instantiates a User model after the LTI authentication finishes. This is then passed downstream, where the User model is actually saved.

Only login, no sign up

screen shot 2017-02-01 at 9 06 57 am

Redirect to EdX

screen shot 2017-02-01 at 9 07 03 am

After clicking "launch" in EdX, direct access without any confirmation

screen shot 2017-02-01 at 9 12 35 am
kevinrobinson commented 7 years ago

tested locally, deploying to test in production build