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

Authenticate #19

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

Conversation

MrFjellstad
Copy link
Contributor

This is more a RFC, so don't just wack it in!

It is lacking a good error response when you try to access resources you don't have access to in the frontend, but that is easy to fix.

It is blocking the wordcloud if you don't authenticate. This is by design, and meant as an example.

The backend needs more work on the user management. It needs to store the user and maybe give it an id so we can use it for something useful!


exports.setup = function (api, express) {
api.use(express.cookieParser());
api.use(express.session({ secret: 'THIS IS A SECRET' }));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put a example secret in config.js.example and put the local secret in config.js

petteraas pushed a commit to petteraas/retrospectacular that referenced this pull request Feb 2, 2014
// serialize users into and deserialize users out of the session. Typically,
// this will be as simple as storing the user ID when serializing, and finding
// the user by ID when deserializing. However, since this example does not
// have a database of user records, the complete Google profile is serialized
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we wack 'connect-redis' in at the same time?
https://npmjs.org/package/connect-redis

@plumpNation
Copy link
Contributor

How much do you think it will it take to get this finished?

@MrFjellstad
Copy link
Contributor Author

The splitting out in to separate authentication module is still missing!

@@ -24,8 +24,11 @@
"dependencies": {
"express": "~3.4.6",
"q": "~0.9.7",
"elasticsearch": "~1.0.3",
"sage": "~0.4.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove sage

@petteraas petteraas closed this Feb 28, 2014
@petteraas petteraas reopened this Feb 28, 2014
@petteraas
Copy link
Contributor

check this https://github.com/petteraas/retrospectacular/tree/MrFjellstad-authenticate_2

it's written on top of your code from this pr.

it adds a user type to the index template,

simple CRUD for user,

it creates a new user in ES ( or loads existing ) based on the Google authenticate (displayName is probably not the best field to check for, but it works for now).

it uses redis as session store.

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