GithubHelp home page GithubHelp logo

solid-contrib / solid-auth-fetcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from inrupt/solid-client-authn-js

1.0 1.0 6.0 4.36 MB

A client library for authenticating with Solid

License: Other

TypeScript 96.80% JavaScript 3.18% Shell 0.02%
running-code

solid-auth-fetcher's People

Contributors

ajacksified avatar dependabot-preview[bot] avatar dependabot[bot] avatar jaxoncreed avatar jeff-zucker avatar josephguillaume avatar michielbdejong avatar noeldemartin avatar nseydoux avatar rubenverborgh avatar vinnl avatar whyineedtofillusername avatar ylebre avatar

Stargazers

 avatar

Watchers

 avatar  avatar

solid-auth-fetcher's Issues

react-native-jose 404

When trying to run npm install, I get a 404 which inrerrupts the npm install process, preventing me from installing any new packages. After searching npm list for the cause, I found the following:


❯ node -v
v14.17.6
❯ npm -v
8.1.1
❯ npm list react-native-jose
[email protected] /Users/i/workspace/mysilio-co/garden
└─┬ [email protected]
  └── [email protected] invalid: "git+https://github.com/hellojoko/react-native-jose.git" from node_modules/solid-auth-fetcher

npm ERR! code ELSPROBLEMS
npm ERR! invalid: [email protected] /Users/i/workspace/mysilio-co/garden/node_modules/solid-auth-fetcher/node_modules/react-native-jose

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/i/.npm/_logs/2021-10-22T01_12_24_542Z-debug.log

It seems to believe the way in which the dependency is configured is wrong. When I manually installed react-native-jose the error went away. However, it wrote a different config to package.json that what is in your package.json: https://github.com/solid/solid-auth-fetcher/blob/master/package.json#L93

❯ cat package.json | grep jose 
    "react-native-jose": "github:hellojoko/react-native-jose",

I'm not sure if this is an issue with my local setup, or actually an issue with your package.json format, but wanted to surface this in case others face it too.

Document the wire protocol

I added oidc-auth-manager and oidc-op as workspaces in my local mashlib-dev
and then added

router.use(function (req, res, next) {
  console.log(req.method, req.url, req.headers)
  next()
})

at this line in node-solid-server.

I can now see that the requests that are made if you run npm run dev-bundle and logging in on http://localhost:3001 are the following:

GET /.well-known/openid-configuration {
  host: 'localhost:8443',
  connection: 'keep-alive',
  'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
  accept: '*/*',
  origin: 'http://localhost:3001',
  'sec-fetch-site': 'cross-site',
  'sec-fetch-mode': 'cors',
  'sec-fetch-dest': 'empty',
  referer: 'http://localhost:3001/',
  'accept-encoding': 'gzip, deflate, br',
  'accept-language': 'nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6,fr;q=0.5,de-DE;q=0.4,de;q=0.3,es-ES;q=0.2,es;q=0.1,id-ID;q=0.1,id;q=0.1'
}
POST /register {
  host: 'localhost:8443',
  connection: 'keep-alive',
  'content-length': '177',
  'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
  'content-type': 'application/json',
  accept: '*/*',
  origin: 'http://localhost:3001',
  'sec-fetch-site': 'cross-site',
  'sec-fetch-mode': 'cors',
  'sec-fetch-dest': 'empty',
  referer: 'http://localhost:3001/',
  'accept-encoding': 'gzip, deflate, br',
  'accept-language': 'nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6,fr;q=0.5,de-DE;q=0.4,de;q=0.3,es-ES;q=0.2,es;q=0.1,id-ID;q=0.1,id;q=0.1'
}
GET /authorize?response_type=id_token%20code&redirect_uri=http%3A%2F%2Flocalhost%3A3001%2F&scope=openid%20profile%20offline_access&client_id=8749c78e98c699453ae805ea06be643d&code_challenge_method=S256&code_challenge=GlkUUyaYvDMHMv0xqfPZJqwF-6ixA8XvPKpepfJkYIc&state=global {
  host: 'localhost:8443',
  connection: 'keep-alive',
  'upgrade-insecure-requests': '1',
  'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
  accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
  'sec-fetch-site': 'cross-site',
  'sec-fetch-mode': 'navigate',
  'sec-fetch-user': '?1',
  'sec-fetch-dest': 'document',
  referer: 'http://localhost:3001/',
  'accept-encoding': 'gzip, deflate, br',
  'accept-language': 'nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6,fr;q=0.5,de-DE;q=0.4,de;q=0.3,es-ES;q=0.2,es;q=0.1,id-ID;q=0.1,id;q=0.1',
  cookie: 'nssidp.sid=s%3AgooZCRxsXKq515ixBxD9_0Gtl9y3BShz.GZeU791kz9F%2Fa72Y8FOQO%2BDs3g1Tfh8JRpEjrPNOyNU'
}
  solid:authentication User is already authenticated as https://localhost:8443/profile/card#me +25s
GET /.well-known/openid-configuration {
  host: 'localhost:8443',
  connection: 'keep-alive',
  'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
  accept: '*/*',
  origin: 'http://localhost:3001',
  'sec-fetch-site': 'cross-site',
  'sec-fetch-mode': 'cors',
  'sec-fetch-dest': 'empty',
  referer: 'http://localhost:3001/?code=af4d61ba90eb3f397045ffe9c66f0575&id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IlhzMnhtbWkxdzJzIn0.eyJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4NDQzIiwiYXVkIjoiODc0OWM3OGU5OGM2OTk0NTNhZTgwNWVhMDZiZTY0M2QiLCJhenAiOiI4NzQ5Yzc4ZTk4YzY5OTQ1M2FlODA1ZWEwNmJlNjQzZCIsInN1YiI6Imh0dHBzOi8vbG9jYWxob3N0Ojg0NDMvcHJvZmlsZS9jYXJkI21lIiwiZXhwIjoxNTk2MTA1MjE5LCJpYXQiOjE1OTQ4OTU2MTksImp0aSI6IjJlNWEwN2NjNWFiODU3ZmQiLCJjX2hhc2giOiJlTXpjSE5GdzNJaDRidTBEem02RnhnIn0.e6HtOELpRSU3WNrCMQL-q_1x6dy3WqbQMj0mW9D7Scg_GmG8yH-Gh-77RMaRGOz_SGWC6OUm4lrcDIGabWBVzN017--TPD618oSoqg5PjHedRHA_ObQc73ZjPeUtu50v3RqzLmrK75Uxz1TyHTUbWWAa76jQ0baH1JdhclwoowibgO4ttoXgUAsFuBgiNyQw9R_gB0-gu5wc8f7UtB-tftapu-lGQzOJpUfTpHsgnbYEkx96NgOtD1UmLDZvlHWJm8s0dzaiWP_IAkTdU5rf0fwiAo_QIdQvxPQfHFXfhvoGXb758jyh2gmBEubXvpl5OdZBsuOLm1p0p96fqFF0Rw&state=global',
  'accept-encoding': 'gzip, deflate, br',
  'accept-language': 'nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6,fr;q=0.5,de-DE;q=0.4,de;q=0.3,es-ES;q=0.2,es;q=0.1,id-ID;q=0.1,id;q=0.1'
}
POST /token {
  host: 'localhost:8443',
  connection: 'keep-alive',
  'content-length': '183',
  'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
  dpop: 'eyJhbGciOiJSUzI1NiIsInR5cCI6ImRwb3Arand0IiwiandrIjp7Imt0eSI6IlJTQSIsImtpZCI6ImxNZmFiNXRQd1FFN0ZlWkU5LW9IdjFSLWxSVzVhc1dURG5XMURhTGZscnMiLCJ1c2UiOiJzaWciLCJhbGciOiJSU0EiLCJlIjoiQVFBQiIsIm4iOiJqNHljTHVhUnBWbW9DLTFDMHFrNF9FNmhReUQwbk9kUmpBU29Na1UwZFFlaktUdlNlTGRiV0w2WGoyN1Q5TDRtMml0ZklxWWYwbUZwM3I1WjNvaWhIak44UHhMODAwYmJobVE4MDN2QzFFVWxMV0R5bnNkeWlIRm4weXpWVF90MHBiN0xwejlBb3Q2Yk1HNHV4ZHkxZmRoNVN0SDNkTTdZUzVDTXBFaFVyOGFRdVpod3JPalRlejUtd2c3bFJrOFE2cUFmaGZTTXJPc2w2Y2dSZ0dGZFNoV2hzTURqNU01MXdlMW1TTloxVS1rVVRhbXhxTzV2UmhmUVdXX1hEZHdNTzJHNUQ1YTNwWGkxYWl5WXVDYVJiTVFoUFNoZkFNVDA1S0hjLVNiSkoxQkVvQ2hhZG1QdTRVRXpfT3RjeThEUklIaDdRRjYwb0ZOTkNRUEZLNndMRVEifX0.eyJodHUiOiJodHRwczovL2xvY2FsaG9zdDo4NDQzL3Rva2VuIiwiaHRtIjoiUE9TVCIsImp0aSI6ImI4ZTJlY2M0LWFlNWMtNDBmZC1hODIzLTJmZmQ0NzQ3MzBlMiIsImlhdCI6MTU5NDg5NTYyMSwiZXhwIjoxNTk0ODk5MjIxfQ.hrXdPI_qxOXzCL5NSrGFDv6FPuGIYx9FQMbFKdi0HoPVBXhebhGG0_L0g8fA12wlISB3nQiDQHpA0y0cH8dyhFpDxPU-7F4_KTL8X9pZgofUIo6GUXlLfauzMag4bF5gogKK_iadiCo2oDA0C7r2OpX_NP-drUUJ6RestG4rHGuAOfpHujW6Xr-j226XYtO3z5YU6K5THpH_UHiljRdMQxFhDZVFg9TimP_tOY8LbmAHgX1p5um0BnW3h2MCKG71TgFHXTSqBWSUkKTieLGSLyPUgzMTbxo-T-bxFl7jZhQGtgN3jLQNw_1l8T0sip2o-_6iR8n5Epqs1SSGUOa3RA',
  authorization: 'Basic ODc0OWM3OGU5OGM2OTk0NTNhZTgwNWVhMDZiZTY0M2Q6YzJmMDZmMDA0NWE4MmY3MjNkYTFlM2ZlZTIyNmY3Y2I=',
  'content-type': 'application/x-www-form-urlencoded',
  accept: '*/*',
  origin: 'http://localhost:3001',
  'sec-fetch-site': 'cross-site',
  'sec-fetch-mode': 'cors',
  'sec-fetch-dest': 'empty',
  referer: 'http://localhost:3001/?code=af4d61ba90eb3f397045ffe9c66f0575&id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6IlhzMnhtbWkxdzJzIn0.eyJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4NDQzIiwiYXVkIjoiODc0OWM3OGU5OGM2OTk0NTNhZTgwNWVhMDZiZTY0M2QiLCJhenAiOiI4NzQ5Yzc4ZTk4YzY5OTQ1M2FlODA1ZWEwNmJlNjQzZCIsInN1YiI6Imh0dHBzOi8vbG9jYWxob3N0Ojg0NDMvcHJvZmlsZS9jYXJkI21lIiwiZXhwIjoxNTk2MTA1MjE5LCJpYXQiOjE1OTQ4OTU2MTksImp0aSI6IjJlNWEwN2NjNWFiODU3ZmQiLCJjX2hhc2giOiJlTXpjSE5GdzNJaDRidTBEem02RnhnIn0.e6HtOELpRSU3WNrCMQL-q_1x6dy3WqbQMj0mW9D7Scg_GmG8yH-Gh-77RMaRGOz_SGWC6OUm4lrcDIGabWBVzN017--TPD618oSoqg5PjHedRHA_ObQc73ZjPeUtu50v3RqzLmrK75Uxz1TyHTUbWWAa76jQ0baH1JdhclwoowibgO4ttoXgUAsFuBgiNyQw9R_gB0-gu5wc8f7UtB-tftapu-lGQzOJpUfTpHsgnbYEkx96NgOtD1UmLDZvlHWJm8s0dzaiWP_IAkTdU5rf0fwiAo_QIdQvxPQfHFXfhvoGXb758jyh2gmBEubXvpl5OdZBsuOLm1p0p96fqFF0Rw&state=global',
  'accept-encoding': 'gzip, deflate, br',
  'accept-language': 'nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6,fr;q=0.5,de-DE;q=0.4,de;q=0.3,es-ES;q=0.2,es;q=0.1,id-ID;q=0.1,id;q=0.1'
}
validating [Object: null prototype] {
  grant_type: 'authorization_code',
  code_verifier: 'g+5ZeOz0TG',
  code: 'd59b7e4340e94795b9f7783c379a9eeb',
  redirect_uri: 'http://localhost:3001/',
  client_id: 'bf38ed7bf2b9936eeb9d594e8e309789'
}

When fetching a resource, they are the following:

GET /private {
  host: 'alice.localhost:8443',
  connection: 'keep-alive',
  dpop: 'eyJ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iOc7Tm_qpvWnAnG9PasGllC8xDTUK1l0nIH3GWpbauurLTj6OpV_zrFA-7ZozO_P0pWM4Q-VT1_iYXWO1t4w98xncYP-uGtzkMW0-qSiPG7Ybx6hg',
  authorization: 'DPOP eyJhbGciOiJSUzI1NiIsImtpZCI6Im41cGVoUHV4NVpVIn0.eyJpc3MiOiJodHRwczovL2xvY2FsaG9zdDo4NDQzIiwiYXVkIjpbIjg3NDljNzhlOThjNjk5NDUzYWU4MDVlYTA2YmU2NDNkIl0sInN1YiI6Imh0dHBzOi8vbG9jYWxob3N0Ojg0NDMvcHJvZmlsZS9jYXJkI21lIiwiZXhwIjoxNTk2MTA1MjIxLCJpYXQiOjE1OTQ4OTU2MjEsImp0aSI6ImM3YzJlZGEyNzAxNzY4ODQiLCJjbmYiOnsiamt0IjoibE1mYWI1dFB3UUU3RmVaRTktb0h2MVItbFJXNWFzV1REblcxRGFMZmxycyJ9fQ.Al5-82WNZaNhdlovhfLOite1rzmUqHQ5Ory91P4Ht54RoRAj2y3JnhopUrQpcH9Z5d81LMSZpr554o2Xv2ADXq9FLcmZL4tdzxR0gOYOH-E6Lo93Le1P1GPc2DXfwnBPdtJdHtBBIgL7nDC49bOSfGttAVw7iRx1_j34t9H-nKgfbPZzQlE1_3ost6oT5Cg2WdHkf1mOtYcWCLxP25AxjqdkFhCh9aMgJOREeF_fVfdlzL2XhKJEOz-Idxc-zuIHonKTwMnI4CaNbI2MLQGksxyc6FTg9gXpav_cs_ui9WiOLLdAE2H8osATOHNpCVB0o7DQol-O4ecPk3v93EzQTQ',
  'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
  accept: '*/*',
  origin: 'http://localhost:3001',
  'sec-fetch-site': 'cross-site',
  'sec-fetch-mode': 'cors',
  'sec-fetch-dest': 'empty',
  referer: 'http://localhost:3001/',
  'accept-encoding': 'gzip, deflate, br',
  'accept-language': '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TML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
  accept: '*/*',
  origin: 'http://localhost:3001',
  'sec-fetch-site': 'cross-site',
  'sec-fetch-mode': 'cors',
  'sec-fetch-dest': 'empty',
  referer: 'http://localhost:3001/',
  'accept-encoding': 'gzip, deflate, br',
  'accept-language': 'nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6,fr;q=0.5,de-DE;q=0.4,de;q=0.3,es-ES;q=0.2,es;q=0.1,id-ID;q=0.1,id;q=0.1'
}
  solid:ACL Using ACL https://localhost:8443/private/.acl for ./ +2m
  solid:ACL    1 direct authentications about <https://localhost:8443/private/> +2ms
  solid:ACL accessDenied: checking access to <https://localhost:8443/private/> by null and origin <http://localhost:3001> +26ms
  solid:ACL    1 direct authentications about <https://localhost:8443/private/> +1ms
  solid:ACL    Checking auth <https://localhost:8443/private/.acl#owner> with agent null +0ms
  solid:ACL     Agent or group: Fail: not public and not logged on. +1ms
  solid:ACL      The agent/group check fails +0ms
  solid:ACL       Check failed: User Unauthorized +0ms
  solid:ACL accessDenied: modeURIorReasons: ["User Unauthorized"] +0ms
  solid:ACL  checking <http://www.w3.org/ns/auth/acl#Read> +0ms
  solid:ACL   MODE REQUIRED NOT ALLOWED: <http://www.w3.org/ns/auth/acl#Read> Denying with User Unauthorized +0ms
  solid:ACL Read access denied to (none): undefined - Unauthorized +0ms
  solid:server Error page because of: UnauthorizedError: Unauthorized
    at AuthenticatedRequest.unauthorized (/Users/michiel/gh/solid/mashlib-dev/workspaces/oidc-auth-manager/node_modules/@solid/oidc-rs/src/AuthenticatedRequest.js:761:19)
    at /Users/michiel/gh/solid/mashlib-dev/workspaces/oidc-auth-manager/node_modules/@solid/oidc-rs/src/AuthenticatedRequest.js:316:24 {
  handled: true,
  statusCode: 401,
  realm: 'https://localhost:8443',
  error: 'invalid_token',
  error_description: 'htu https://alice.localhost:8443/private does not match https://alice.localhost:8443/private/',
  error_uri: undefined
} +0ms
  solid:server Display login-required for https://alice.localhost:8443/private/ +0ms
GET /.well-known/openid-configuration {
  host: 'localhost:8443',
  connection: 'keep-alive',
  'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
  accept: '*/*',
  origin: 'http://localhost:3001',
  'sec-fetch-site': 'cross-site',
  'sec-fetch-mode': 'cors',
  'sec-fetch-dest': 'empty',
  referer: 'http://localhost:3001/',
  'accept-encoding': 'gzip, deflate, br',
  'accept-language': 'nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6,fr;q=0.5,de-DE;q=0.4,de;q=0.3,es-ES;q=0.2,es;q=0.1,id-ID;q=0.1,id;q=0.1'
}
POST /token {
  host: 'localhost:8443',
  connection: 'keep-alive',
  'content-length': '114',
  'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36',
  dpop: 'eyJhbGciOiJSUzI1NiIsInR5cCI6ImRwb3Arand0IiwiandrIjp7Imt0eSI6IlJTQSIsImtpZCI6ImxNZmFiNXRQd1FFN0ZlWkU5LW9IdjFSLWxSVzVhc1dURG5XMURhTGZscnMiLCJ1c2UiOiJzaWciLCJhbGciOiJSU0EiLCJlIjoiQVFBQiIsIm4iOiJqNHljTHVhUnBWbW9DLTFDMHFrNF9FNmhReUQwbk9kUmpBU29Na1UwZFFlaktUdlNlTGRiV0w2WGoyN1Q5TDRtMml0ZklxWWYwbUZwM3I1WjNvaWhIak44UHhMODAwYmJobVE4MDN2QzFFVWxMV0R5bnNkeWlIRm4weXpWVF90MHBiN0xwejlBb3Q2Yk1HNHV4ZHkxZmRoNVN0SDNkTTdZUzVDTXBFaFVyOGFRdVpod3JPalRlejUtd2c3bFJrOFE2cUFmaGZTTXJPc2w2Y2dSZ0dGZFNoV2hzTURqNU01MXdlMW1TTloxVS1rVVRhbXhxTzV2UmhmUVdXX1hEZHdNTzJHNUQ1YTNwWGkxYWl5WXVDYVJiTVFoUFNoZkFNVDA1S0hjLVNiSkoxQkVvQ2hhZG1QdTRVRXpfT3RjeThEUklIaDdRRjYwb0ZOTkNRUEZLNndMRVEifX0.eyJodHUiOiJodHRwczovL2xvY2FsaG9zdDo4NDQzL3Rva2VuIiwiaHRtIjoiUE9TVCIsImp0aSI6IjI3YjdiYjBlLTRmYjYtNDU5My05NmVmLTNjNjFjMGNiZDUzYSIsImlhdCI6MTU5NDg5NTc2MCwiZXhwIjoxNTk0ODk5MzYwfQ.htX92lW_EM5EYvD3ROxWi8SqkQWx1h6oDgKqjkw537CHXD3coam2QfhypHDt6X5FesHsP3ovyYpLqXNoqdQv2XV52cM5rxiN0h0jUJLXjoJeI3trxq4t_qzUejUdAFigkhKE0lAacqCbaO7vuTAWjmm1GL-07PhpLp5GqgTdIQ3ywswojrfb4QqlcF6yiX9taV6VPQUO8C6sXg8vw0MM64HoL4NW24LpDha2Now5lioV0wRzYtiv8M4hugz-S7G2gJkhERtoN3LGL5VfyXnvz2gu78LLxY9uwkv9RafR28zCSpCmn6ecgbGX_ERB3pj4bRzh-9DyNvMi6sZywtm0Rw',
  authorization: 'Basic ODc0OWM3OGU5OGM2OTk0NTNhZTgwNWVhMDZiZTY0M2Q6YzJmMDZmMDA0NWE4MmY3MjNkYTFlM2ZlZTIyNmY3Y2I=',
  'content-type': 'application/x-www-form-urlencoded',
  accept: '*/*',
  origin: 'http://localhost:3001',
  'sec-fetch-site': 'cross-site',
  'sec-fetch-mode': 'cors',
  'sec-fetch-dest': 'empty',
  referer: 'http://localhost:3001/',
  'accept-encoding': 'gzip, deflate, br',
  'accept-language': 'nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6,fr;q=0.5,de-DE;q=0.4,de;q=0.3,es-ES;q=0.2,es;q=0.1,id-ID;q=0.1,id;q=0.1'
}
validating [Object: null prototype] {
  grant_type: 'refresh_token',
  refresh_token: '78e44965516e24fbb88f5537db651ee2',
  client_id: '8749c78e98c699453ae805ea06be643d'
}

The browser's developer console on http://localhost:3001 actually shows:

Fetcher.js:22 GET https://alice.localhost:8443/private/ 401 (Unauthorized)
Fetcher.js:22 POST https://localhost:8443/token 500 (Internal Server Error)

so that second error is also something to look into.

onSession does not work with popup workflow

The "session" event is emitted by handleRedirect, which is never called in the main window with the popup workflow. The callback provided to onSession is therefore never called.

https://github.com/solid/solid-auth-fetcher/blob/877dd07e8a0ecd00121414b21d1aeffbb72660d0/src/AuthFetcher.ts#L121

One option would be to emit a "session" event after the session is created in PopUpLoginHandler
https://github.com/solid/solid-auth-fetcher/blob/877dd07e8a0ecd00121414b21d1aeffbb72660d0/src/login/popUp/PopUpLoginHandler.ts#L73

As a workaround, when using the popup workflow, the onSession callback can be called on completion of login, e.g.

solidAuthFetcher.login({
      oidcIssuer: "https://identityProvider.com",
      popUp: true,
      popUpRedirectPath: "/popup.html"
    }).then( session => console.log(session.webId)  )

Must use import to load ES Module

I'm likely doing something wrong when importing solid-auth-fetcher, but I'm not sure what. I have included a relevant code snipper below:

Describe the bug
Trying to run example code from server.ts results in node crashing with the error: Must use import to load ES Module: /home/jesse/.../node_modules/node-fetch/src/index.js

To Reproduce
Put the following code snippet in a typescript file, and then run it with node:

import {getAuthFetcher, getNodeSolidServerCookie} from "solid-auth-fetcher";

async handleRequest(request: Request) {
    let serverRoot = this.configMgr.getRootConfig().serverRoot;
    let userPrefs = request.userPreferences;
    let appOrigin = request.from;
    const cookie = await getNodeSolidServerCookie(
      serverRoot,
      userPrefs.username,
      userPrefs.password
    );
    if (!cookie) {
      throw new AuthenticationError(
        `Could not sign in with given credentials for user ${userPrefs.username}`
      );
    }
    const fetcher = await getAuthFetcher(serverRoot, cookie, appOrigin);
    const result = await fetcher.fetch(request.resource);
  }

Expected behavior
The code to run without throwing a fatal error

Screenshots


internal/modules/cjs/loader.js:1102
      throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
      ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/jesse/Documents/Thesis/master-thesis-jesse-geens/node_modules/node-fetch/src/index.js
require() of ES modules is not supported.
require() of /home/jesse/Documents/Thesis/master-thesis-jesse-geens/node_modules/node-fetch/src/index.js from /home/jesse/Documents/Thesis/master-thesis-jesse-geens/node_modules/solid-auth-fetcher/dist/obtainAuthHeaders.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/jesse/Documents/Thesis/master-thesis-jesse-geens/node_modules/node-fetch/package.json.

    at new NodeError (internal/errors.js:322:7)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1102:13)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)
    at Object.<anonymous> (/home/jesse/Documents/Thesis/master-thesis-jesse-geens/node_modules/solid-auth-fetcher/dist/obtainAuthHeaders.js:8:38)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32) {
  code: 'ERR_REQUIRE_ESM'
}

Desktop (please complete the following information):

  • OS:
$ uname -a
Linux jesse-thinkpad 5.13.19-2-MANJARO #1 SMP PREEMPT Sun Sep 19 21:31:53 UTC 2021 x86_64 GNU/Linux
  • Browser [e.g. chrome, safari]: N/A
  • Version:
$ nvm current
v16.13.1

Additional context
Package.json:

"dependencies": {
    "express": "^4.17.2",
    "express-pino-logger": "^7.0.0",
    "jsonschema": "^1.4.0",
    "node-fetch": "^3.1.0",
    "pino": "^7.6.2",
    "solid-auth-fetcher": "^1.5.3"
  }

WebId not retrieved correctly from ESS

I've been testing the library with different servers and it doesn't seem to work properly with ESS. When I try to log in using https://broker.pod.inrupt.com, the webId in the session is an alphanumeric string instead of a url.

To reproduce this, you can visit ramen.noeldemartin.com, click on "try using a different authentication method" and select "Log in using the community authentication library".

If you want to see how I am using this library, everything is encapsulated in this file: CommunityAuthenticator.ts

Test dev-ios and dev-android

Should try and see if npm run dev-ios and npm run dev-android are working and update the readme with more info (e.g. on how to run Android studio etc) if they do.

example/server is out of date?

When trying to run the server example:

loopy:solid-auth-fetcher michiel$ cd examples/server/
loopy:server michiel$ npm run dev

> [email protected] dev /Users/michiel/gh/solid/solid-auth-fetcher/examples/server
> ts-node-dev src/server.ts

Using ts-node version 8.10.2, typescript version 3.9.6
Compilation error in /Users/michiel/gh/solid/solid-auth-fetcher/examples/server/src/server.ts
[ERROR] 11:33:17 ⨯ Unable to compile TypeScript:
src/server.ts:7:34 - error TS2307: Cannot find module 'solid-auth-fetcher/dist/neededAction/INeededRedirectAction' or its corresponding type declarations.

7 import INeedeRedirectAction from "solid-auth-fetcher/dist/neededAction/INeededRedirectAction";
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/server.ts:67:39 - error TS2339: Property 'webId' does not exist on type 'ISolidSession'.
  Property 'webId' does not exist on type 'ILoggedOutSolidSession'.

67     sessions[req.session.localUserId].webId
                                         ~~~~~
src/server.ts:70:48 - error TS2339: Property 'webId' does not exist on type 'ISolidSession'.
  Property 'webId' does not exist on type 'ILoggedOutSolidSession'.

70       webId: sessions[req.session.localUserId].webId,
                                                  ~~~~~
src/server.ts:83:39 - error TS2339: Property 'webId' does not exist on type 'ISolidSession'.
  Property 'webId' does not exist on type 'ILoggedOutSolidSession'.

83     sessions[req.session.localUserId].webId
                                         ~~~~~
src/server.ts:87:25 - error TS2339: Property 'fetch' does not exist on type 'ISolidSession'.
  Property 'fetch' does not exist on type 'ILoggedOutSolidSession'.

87     ] as ISolidSession).fetch("http://localhost:10100/", {});
                           ~~~~~
src/server.ts:89:48 - error TS2339: Property 'webId' does not exist on type 'ISolidSession'.
  Property 'webId' does not exist on type 'ILoggedOutSolidSession'.

89       webId: sessions[req.session.localUserId].webId,
                                                  ~~~~~
src/server.ts:102:39 - error TS2339: Property 'webId' does not exist on type 'ISolidSession'.
  Property 'webId' does not exist on type 'ILoggedOutSolidSession'.

102     sessions[req.session.localUserId].webId
                                          ~~~~~
src/server.ts:104:45 - error TS2339: Property 'logout' does not exist on type 'ISolidSession'.
  Property 'logout' does not exist on type 'ILoggedOutSolidSession'.

104     await sessions[req.session.localUserId].logout();
                                                ~~~~~~

Logging in freezes the UI

There are some situations where the UI is frozen for a couple of seconds after calling the login method. I'm not sure why it happens, and sometimes it works properly on subsequent logins so maybe it has something to do with data stored in the browser.

To reproduce this, you can visit ramen.noeldemartin.com, click on "try using a different authentication method" and select "Log in using the community authentication library". I have tried both in Firefox and Chrome, and it's more accentuated using Firefox.

If this isn't a bug I think it'd be nice to provide an API that allows calling login within a web worker that wouldn't block the UI. Which I know is not easy as it sounds, because web workers need to be served on a different file. Just throwing ideas :).

NPM audit nightmare

Running npm audit in a newly downloaded solid-auth-fetcher gives

found 4414 vulnerabilities (4 low, 92 moderate, 4318 high) in 1234 scanned packages

Running npm audit fix fixes all but 2 of them, but then the tests for solid-auth-fetcher fail.

getSessions() is missing

Describe the bug
According to the readme at https://github.com/solid/solid-auth-fetcher/blob/master/README.md#logging-in-multiple-users, there should be getSessions() method. However, after using the library from npm, there is no exported member, nor implementation of the getSessions() method.

To Reproduce
Steps to reproduce the behavior:

  1. npm install solid-auth-fetcher
  2. import { getSessions } from 'solid-auth-fetcher'
  3. no exported member getSessions

Expected behavior
getSessions implemented as promoted :)

Additional context
latest build - 1.3.5

Update dependencies


 @types/node                       ^14.0.23  →  ^14.14.10     
 @types/node-jose                    ^1.1.4  →     ^1.1.5     
 @types/uuid                         ^8.0.0  →     ^8.3.0     
 cross-fetch                         ^3.0.5  →     ^3.0.6     
 form-urlencoded                     ^4.1.4  →     ^4.2.1     
 husky                               ^4.2.3  →     ^4.3.0     
 jose                               ^1.27.2  →     ^3.1.3     
 lint-staged                       ^10.2.11  →    ^10.5.2     
 node-jose                           ^1.1.3  →     ^2.0.0     
 tsyringe                            ^4.3.0  →     ^4.4.0     
 uuid                                ^8.2.0  →     ^8.3.1     
 @types/jest                       ^24.0.24  →   ^26.0.15     
 @types/node-fetch                   ^2.5.6  →     ^2.5.7     
 @typescript-eslint/eslint-plugin   ^2.34.0  →     ^4.9.0     
 @typescript-eslint/parser          ^2.34.0  →     ^4.9.0     
 concurrently                        ^5.2.0  →     ^5.3.0     
 eslint                              ^6.1.0  →    ^7.14.0     
 eslint-config-prettier             ^6.10.0  →    ^6.15.0     
 jest                               ^25.1.0  →    ^26.6.3     
 node-fetch                          ^2.6.0  →     ^2.6.1     
 prettier                           ^1.19.1  →     ^2.2.1     
 ts-jest                            ^25.5.1  →    ^26.4.4     
 ts-loader                           ^7.0.4  →    ^8.0.11     
 typescript                          ^3.9.6  →     ^4.1.2     
 webpack                            ^4.41.6  →     ^5.9.0     
 webpack-bundle-analyzer             ^3.8.0  →     ^4.2.0     
 webpack-cli                        ^3.3.12  →     ^4.2.0     
 webpack-merge                       ^4.2.2  →     ^5.4.0     
 ws                                  ^7.3.1  →     ^7.4.0    

Should figure out which of those updates break the build, then downgrade them like we do for some other repos in https://github.com/solid/solidos/blob/master/scripts/release

Allow client to specify intent to login vs register

A client can show a 'login or register' button.
After that, the IDP would still have to show two options, one to log in and one to register.
Instead, a client may prefer to show one 'login' button and one 'register' button.
When they do that, it would be nice if the page they land on at the IDP, that option is pre-selected.
Of course, the IDP would probably still allow to switch between login vs register on there, but at least it saves a click.

See also the corresponding issue here: nodeSolidServer/solid-auth-client#102

redirect_uri seems to be null in registration

Have redis running on localhost. Then, in one terminal, run:

git clone https://github.com/michielbdejong/solid-app-kit
cd solid-app-kit
npm install
npm run gen-cert
npm run build
npm start

And in another run:

git clone https://github.com/solid/storage-tests
cd storage-tests
npm install
NODE_TLS_REJECT_UNAUTHORIZED=0 ts-node-dev test/helpers/obtain-auth-headers.ts

You'll see an error:

Login Registration Error: {"error":"invalid_redirect_uri","error_description":"redirect_uris must only contain strings"}

Authorization code expired

Running dev-bundle against latest NSS with some debug statements in node_modules/@solid/oidc-auth-manager/node_modules/@solid/oidc-op, I'm seeing:

getting from backend 064b954843994809143f3e6afce99639
error HandledError: 400 Bad Request
    at TokenRequest.badRequest (/Users/michiel/gh/solid/node-solid-server/node_modules/@solid/oidc-auth-manager/node_modules/@solid/oidc-op/src/handlers/BaseRequest.js:249:17)
    at /Users/michiel/gh/solid/node-solid-server/node_modules/@solid/oidc-auth-manager/node_modules/@solid/oidc-op/src/handlers/TokenRequest.js:570:26 {
  handled: true,
  error: 'invalid_grant',
  error_description: 'Authorization code expired'
}

Compatibility with Content Security Policy without 'unsafe-eval'?

Describe the bug
nodeSolidServer/solid-auth-client#162 is an issue here too.
I'm not sure what the relationship is with solid-auth-client or the degree to which CSP compatibility is a goal here compared to solid-client-authn, but new Function calls still exist in the solid-auth-fetcher bundle.
(I'm mostly adding this in case others run into an error)

To Reproduce
Specify a Content-Security-Policy header without 'unsafe-eval'
Login ultimately fails with "Could not obtain the key to sign the token with."

refresh_token=thisIsARefreshToken

I'm seeing:

fetch https://localhost:8443/token {
  method: 'POST',
  headers: {
    DPoP: 'eyJhbGciOiJSUzI1NiIsInR5cCI6ImRwb3Arand0IiwiandrIjp7Imt0eSI6IlJTQSIsImtpZCI6IjVmMVFZcmppOGItWWdGczBIbmNuam52ZmZ4X0RKdTU3R1hDeXlLMDlBakUiLCJ1c2UiOiJzaWciLCJhbGciOiJSU0EiLCJlIjoiQVFBQiIsIm4iOiJ5d3hpTnFXUkpFblF3RkpBeDlJVFFkeERKVWw2dzdIV3dXZTZVOUtQYnYzNEZ0NzJVd21iZHA2dTcwb1FvMkFQVkozMlNjbkJOeV80S2FuMU5VQktRWW12T1k2VFdBQWpPMzRBY0FTamZ6aV90S0xzTlY1ZGhTdE5tTWlzTUc3c2c4c2drWndzOFd2R29rX2tTNUNTM2lVQmVnVlhacmhZTDQwb1RNSjdmNWFERmg2cUJhbHZpVms5djliMEp1UklYNWNDYmFfU1RyUE9CZlZ5Mk5YNHFuRmdtQ2xqODhDMkFvY1BBVThFYW9ub0FiUzlzRGtfTTY5d2hDbndRTGJBU0ZjajhIREE5QTZDRmhJYnBqX0F2dnFBUnJwRnpOZlhQZXdvNHVIOVpuby1RUEgxaTdBbmVBYmZDZnlWdXIwT3RFcHhvUWNZbFh6aVE1c3NRbGs3THcifX0.eyJodHUiOiJodHRwczovL2xvY2FsaG9zdDo4NDQzL3Rva2VuIiwiaHRtIjoiUE9TVCIsImp0aSI6IjRiOTU2ZmI1LTdkYTItNDk0ZS04OTFhLTg0NzYyNjUxNjlkNSIsImlhdCI6MTU5NDgxMDk4MiwiZXhwIjoxNTk0ODE0NTgyfQ.MOHhHoC2vhYWIhHTdgp0vLRirTi1XAjJ-QcIwwpZBR6suvMA19yBPeSFtmPjIlS0_EKlrVzqtiqtB9KmGwUsg6HSRi4H3u4jEbu837P_VFRzILPuupi_S3Y--RrXJ04lV6PvE-OI5Mv7sSnWXjRfEfKUnebB2XBeOTIbmNIwS3jbqjwYexaMm3ZTWFlZE5Nq_vh0BrX61fAgxRROJqQld-f7EUhdUxUnhY0peXstNVaX8wW1p2yxTM23ihJPgvbjYjTrNE-DxuyD-Y6W0UUngmmryh-0Rml3FUUGzaU8k_9s5Sul4HmRh0otpeAhPb9WqXum-P-YWSB8EFQ3yoe5mQ',
    'content-type': 'application/x-www-form-urlencoded',
    Authorization: 'Basic NTg5N2MyZGY1MTFlYWFkMjRhYzM5OTk5YzA1MzZlYzY6OTc0ZjUxNmQ4YzJkZDUzYjRhYzQ3NzhlMGVmYWE0NWE='
  },
  body: 'grant_type=refresh_token&refresh_token=thisIsARefreshToken&client_id=5897c2df511eaad24ac39999c0536ec6'
}

The 'thisIsARefreshToken' string looks like it might have been intended as a test fixture, not as a string that should be showing up in production?

cc @jaxoncreed

Login from nodejs is broken (and most of a fix?)

Login from nodejs now produces

(node:816301) UnhandledPromiseRejectionWarning: TypeError: form_urlencoded_1.default is not a function
    at TokenRequester.request (/home/jeff/Dropbox/Web/solid/solid-node-client/node_modules/solid-auth-fetcher/dist/login/oidc/TokenRequester.js:53:44)

This error does not occur when using [email protected] but does occur with the latest version 4.5.1. It has something to do with how the function is exported. This change to solid-auth-fetcher's dist/* makes solid-auth-fetcher work with either version, but I can not figure out how to change it in the src/* typescript.

// Remove ths line (20) in dist/login/oidc/TokenRequester.js
Line 20 const form_urlencoded_1 = __importDefault(require("form-urlencoded"));
// Replace with these : 
let form_urlencoded_1 = __importDefault(require("form-urlencoded"));
if( typeof form_urlencoded_1.default != "function" ) {
  form_urlencoded_1 = form_urlencoded_1.default ;
} 

Are the react-native example still working?

Describe the bug
I trying to run react-native example, but i get this error on log:

[Tue May 31 2022 16:41:29.871] BUNDLE ./index.js
error: Error: While resolving module solid-auth-fetcher/dist/experiment, the Haste package solid-auth-fetcher was found. However the module dist/experiment could not be found within the package. Indeed, none of these files exist:

To Reproduce
Steps to reproduce the behavior:

  1. Go to the react-native example folder
  2. On console 1 run: npx react-native start
  3. On console 2 run: npx react-native run-android
  4. Get error on console 1 and android emulator

**Screenshots
Captura de tela de 2022-05-31 17-07-46

Captura de tela de 2022-05-31 17-06-43

Additional context
I'm trying to create a react-native application that authenticate with solid servers

Thank you for the contribuition!

Third party iframe for authentication?

Isnt it possible to open a third party iframe for authentication? from what I understand, cookies are not used by the authentication process. Am I right on this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.