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

Remonte le token Zotero avec le profil utilisateur #584

Merged
merged 1 commit into from
Mar 16, 2022
Merged

Conversation

thom4parisot
Copy link
Member

fixes #582

@netlify
Copy link

netlify bot commented Mar 10, 2022

✔️ Deploy Preview for stylo-dev ready!

🔨 Explore the source changes: 90bdaf9

🔍 Inspect the deploy log: https://app.netlify.com/sites/stylo-dev/deploys/622a2bb648b11500084d4278

😎 Browse the preview: https://deploy-preview-584--stylo-dev.netlify.app/

@antoinentl
Copy link
Member

Le test s'arrête assez vite puisque j'ai une erreur 502 au moment de valider l'accès sur Zotero, l'erreur vient du domaine stylo-dev.huma-num.fr :

Capture d’écran de 2022-03-10 11-52-32

@ggrossetie
Copy link
Collaborator

Le service est tombé il y a 13 minutes :

/usr/src/app/app.js:207
      const email = req.user.email
                             ^

TypeError: Cannot read properties of undefined (reading 'email')
    at /usr/src/app/app.js:207:30
    at OAuthStrategy.strategy.success (/usr/src/app/node_modules/passport/lib/middleware/authenticate.js:219:18)
    at verified (/usr/src/app/node_modules/passport-oauth1/lib/strategy.js:168:20)
    at OAuthStrategy._verify (/usr/src/app/app.js:84:12)
    at /usr/src/app/node_modules/passport-oauth1/lib/strategy.js:184:24
    at OAuthStrategy.userProfile (/usr/src/app/node_modules/passport-oauth1/lib/strategy.js:297:10)
    at loadIt (/usr/src/app/node_modules/passport-oauth1/lib/strategy.js:362:17)
    at OAuthStrategy._loadUserProfile (/usr/src/app/node_modules/passport-oauth1/lib/strategy.js:377:25)
    at destroyed (/usr/src/app/node_modules/passport-oauth1/lib/strategy.js:159:16)
    at SessionStore.destroy (/usr/src/app/node_modules/passport-oauth1/lib/requesttoken/session.js:34:3)
    at /usr/src/app/node_modules/passport-oauth1/lib/strategy.js:201:37
    at /usr/src/app/node_modules/oauth/lib/oauth.js:472:12
    at passBackControl (/usr/src/app/node_modules/oauth/lib/oauth.js:390:11)
    at IncomingMessage.<anonymous> (/usr/src/app/node_modules/oauth/lib/oauth.js:409:9)
    at IncomingMessage.emit (node:events:402:35)
    at endReadableNT (node:internal/streams/readable:1343:12)

@ggrossetie
Copy link
Collaborator

ggrossetie commented Mar 10, 2022

J'ai relancé et ça fonctionne bien chez moi. Je vais essayer avec Firefox.

Edit: ça passe aussi avec Firefox, je ne sais pas pourquoi/comment tu as obtenu ce comportement avec req qui ne contient pas de user.

@thom4parisot thom4parisot merged commit 02a06a2 into master Mar 16, 2022
@thom4parisot thom4parisot deleted the fix/582 branch March 16, 2022 10:30
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.

Connection compte Zotero impossible
3 participants