noamb / sorcery-example-app Goto Github PK
View Code? Open in Web Editor NEWsorcery example app
sorcery example app
To complete the aplication: an example how to change a logged user password, validating the current password:
Ex:
[...............] current password
[...............] new password
[...............] password confirmation
Only changing if the user knows the current password
it seems that sometimes this error pop up from twitter because oauth2 is not ready/loaded.
I tried to move
require 'oauth2'
to the Gemfile and it seems better
Guess I must be missing something here. I have a simple integration spec from which I'm trying to login a user.
let(:user) { Factory(:user, :email => "[email protected]", :password => "secret", :password_confirmation => "secret" ) }
and then in:
background do
login_user(user)
....
end
when the spec is run:
Failure/Error: login_user(user)
NoMethodError:
undefined method `auto_login' for nil:NilClass
# ./spec/requests/deleting_entries_spec.rb:15:in `block (2 levels) in <top (required)>'
When creating a new user the password seems to just be stored as plaintext. I got the feeling that sorcery wasn't processing it for some reason. I checked over the example app and saw authenticates_with_sorcery!
in the user class, but I just get an undefined method error when adding it to my class. I also have config.user_class = User
in my initializer. Any ideas?
Hey NoamB,
I was playing around with the example app and noticed that the PasswordResetsController line 29 was not working correctly for me.
if @user.reset_password!(params[:user])
#changed to
if @user.change_password!(params[:user][:password])
Thanks for all your work! Loving the gem.
Mike
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.