-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Unable to get user profile information like first name, last name, email , organization/ instittution from the OAuth2Strategy CILogon implementation here. .
Below is the log of the CILogon response for this code
fetch('https://cilogon.org/oauth2/userinfo?access_token=' + accessToken)
.then(function (response) {
console.log("CILogon response", response);
return response.json();
})
.then(function (json) {
process.nextTick(() => cb(null, json));
})
The log is below:
CILogon response Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: {
body: PassThrough {
_events: [Object],
_readableState: [ReadableState],
_writableState: [WritableState],
allowHalfOpen: true,
_maxListeners: undefined,
_eventsCount: 5,
[Symbol(shapeMode)]: true,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null
},
disturbed: false,
error: null
},
[Symbol(Response internals)]: {
url: 'https://cilogon.org/oauth2/userinfo?access_token=<access_token>',
status: 200,
statusText: 'OK',
headers: Headers { [Symbol(map)]: [Object: null prototype] },
counter: 0
}
However, directly logging in to CILogon from browser, you are able to get all these information. See screenshot below.
This user information is required to update the "users" table in postgresDB. The user email can be used as the unique identifier. Currently the implementation uses username as unique identifier, which is not ideal.

Metadata
Metadata
Assignees
Labels
No labels