Skip to content

Add redirect, add fill display with good data#3

Open
galileo wants to merge 1 commit intomasterfrom
fix-displaying-information
Open

Add redirect, add fill display with good data#3
galileo wants to merge 1 commit intomasterfrom
fix-displaying-information

Conversation

@galileo
Copy link
Owner

@galileo galileo commented Mar 29, 2017

I am stuck on the displaying information with passport and express. The problem is that I am expecting in request.user the value from passport strategy 'verify' method, but I still getting from this element the values returned by Google API.

My console output looks like this:

app_1      | Error: Can't set headers after they are sent.

I need to figure it out how this works, and if this is my problem with this express and passport setup.

zrzut ekranu 2017-03-29 o 15 07 15

</form>
${JSON.stringify(req.user)}`)
if (!req.user) {
res.redirect('/')
Copy link

Choose a reason for hiding this comment

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

probably want to return at this point, so we don't send content as well as a redirect.

eg. return res.redirect('/')

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.

2 participants

Comments