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

Revamp auth and authPage #7

Open
meghprkh opened this issue Jul 6, 2016 · 0 comments
Open

Revamp auth and authPage #7

meghprkh opened this issue Jul 6, 2016 · 0 comments
Labels

Comments

@meghprkh
Copy link
Contributor

meghprkh commented Jul 6, 2016

Currently the requests are handled by authPage and auth's login function only takes the token.

Instead IMO its is better to isolate the login entirely into auth and let authPage do the work of fetching the values from the form and passing it to auth. So basically have the following two functions in auth.login (email, password, callback) and auth.register (email, password, name, callback) and let them do the requests to the backend also.

Callbacks ref: http://javascriptissexy.com/understand-javascript-callback-functions-and-use-them/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant