Closed albedo15 closed 2 years ago
Your provider just return "unknown response". It is "common" for OAuth2 (every "service" invent own response format). If your service support OIDC (OpenID Connect) - use it instead.
thank for answer no, my service don't support OIDC. Just CAS and Oauth2
a screen with error
There is not solution ?
There is link with this anwer ? https://github.com/zorn-v/nextcloud-social-login/issues/170#issuecomment-626191601
There is link with this anwer ? #170 (comment)
Almost. https://github.com/zorn-v/nextcloud-social-login/issues/277 I can add it to OAuth2 as "generic" (but it worst, as all OAuth2), but I need to know what to add.
Sorry, you need to put print_r($data); die();
here in your case
https://github.com/zorn-v/nextcloud-social-login/blob/dc795a77c1c365a3492cb984a8273efdd1f69e36/lib/Provider/CustomOAuth2.php#L41-L43
thanks, this is the return : (I put *****on my personal data )
Hybridauth\Data\Collection Object ( [collection:protected] => stdClass Object ( [level] => [login] => . [lastName] => * [firstName] => ** [externalId] => 36125 [birthDate] => *** [forceChangePassword] => [needRevalidateTerms] => [deletePending] => [username] => * [type] => ENSEIGNANT [hasPw] => 1 [federatedIDP] => [optionEnabled] => Array ( ) [userId] => ec180f0b-c0f9-4045-8be4-dcf2ecc39ed3 [uai] => Array ( [0] => **** ) [hasApp] => 1 [childrenIds] => Array ( ) [widgets] => Array ( [0] => stdClass Object ( [application] => Actualites [i18n] => /actualites/public/widgets/last-infos-widget/i18n [name] => last-infos-widget [path] => /actualites/public/widgets/last-infos-widget/last-infos-widget.html [mandatory] => 1 [id] => 232941bc-7c2d-4bf7-a5a9-13d249cba611 [js] => /actualites/public/widgets/last-infos-widget/last-infos-widget.js ) [1] => stdClass Object ( [application] => [i18n] => /assets/widgets/calendar-widget/i18n [name] => calendar-widget [path] => /assets/widgets/calendar-widget/calendar-widget.html [mandatory] => [id] => 97f247db-b9c0-4013-bf49-cc666ed28f58 [js] => /assets/widgets/calendar-widget/calendar-widget.js ) [2] => stdClass Object ( [application] => [i18n] => /assets/widgets/my-apps/i18n [name] => my-apps [path] => /assets/widgets/my-apps/my-apps.html [mandatory] => [id] => 502b7e07-34e4-41a6-9f8e-81540d103951 [js] => /assets/widgets/my-apps/my-apps.js ) [3] => stdClass Object ( [application] => Signets [i18n] => /bookmark/public/widgets/bookmark-widget/i18n [name] => bookmark-widget [path] => /bookmark/public/widgets/bookmark-widget/bookmark-widget.html [mandatory] => [id] => 65a5f0a9-8e41-4e8b-a96f-789a3e7fe898 [js] => /bookmark/public/widgets/bookmark-widget/bookmark-widget.js ) [4] => stdClass Object ( [application] => Rss [i18n] => /rss/public/widgets/rss-widget/i18n [name] => rss-widget [path] => /rss/public/widgets/rss-widget/rss-widget.html [mandatory] => [id] => dcf7f0bf-c9ec-4b3a-93f8-7023caa6fced [js] => /rss/public/widgets/rss-widget/rss-widget.js ) [5] => stdClass Object ( [application] => [i18n] => /assets/widgets/record-me/i18n [name] => record-me [path] => /assets/widgets/record-me/record-me.html [mandatory] => [id] => 8c8f7163-f1f9-4d3f-bb89-20d2196c412a [js] => /assets/widgets/record-me/record-me.js ) [6] => stdClass Object ( [application] => [i18n] => /assets/widgets/notes/i18n [name] => notes [path] => /assets/widgets/notes/notes.html [mandatory] => [id] => d2ccc964-eaf5-49d9-b49c-35e7ed90e6f1 [js] => /assets/widgets/notes/notes.js ) [7] => stdClass Object ( [application] => Calendar [i18n] => /calendar/public/widgets/agenda-widget/i18n [name] => agenda-widget [path] => /calendar/public/widgets/agenda-widget/agenda-widget.html [mandatory] => [id] => 6cd1bfba-467a-4289-870b-4ed45c5919ed [js] => /calendar/public/widgets/agenda-widget/agenda-widget.js ) ) [sessionMetadata] => stdClass Object ( [_id] => 50f9fe5e-15e3-46a9-9141-14831da71786 [userId] => ec180f0b-c0f9-4045-8be4-dcf2ecc39ed3 ) [classId] => 5466$64 [schoolName] => * [identifier] => [displayName] => **** ) )
userId
added as oauth2 identifier in v4.8.3
Check it
sorry, but I don't understand how I should use userId ? EDIT : Ok, I am in v4.8.2, I understand. EDIT :I don't find v4.8.3 EDIT : i found the update file, i'm trying to figure out how to install it (usually i use the nextcloud interface, but here the latest version is not there yet) EDIT : ok I succeeded ! And it works !! Thanks you very very much !!
Hello
I'm french, but I try speak in english ...
I configure Nexcloud as a client Oauth2 and I have an error : Can not get identifier from provider
My configuration Nexcloud (client) :
API Base URL : https://www.moncollege-ent.essonne.fr/
Authorize url (can be relative to base URL) : https://www.moncollege-ent.essonne.fr/auth/oauth2/auth
Token url (can be relative to base URL) : https://www.moncollege-ent.essonne.fr/auth/oauth2/token
Profile url (can be relative to base URL) : https://www.moncollege-ent.essonne.fr/auth/oauth2/userinfo
Client Id : nextcloud-0911491b
Client Secret : •••••••••
Scope (optional) : userinfo
My configuration Provider :![image](https://user-images.githubusercontent.com/87094370/124818622-8de4aa00-df6b-11eb-94f3-6ae0677a26b0.png)
You know help me ? thank