plugin-oauth2
plugin-oauth2 copied to clipboard
Error "Action not implemented" with Nextcloud as OAuth2-Provider
Hi, It looks like everythink is working. But after granting access, I get following error.
Internal Error: Action not implemented
My way to configure NextCloud and Kanboard.
In Nextcloud I add a OAuth-Client.
Name: nextcloud.example.com
Redirect URL: https://kanboard.example.com/?controller=OAuthController&action=handler&plugin=OAuth2
In Kanboard I set following values in the fields for the OAuth Settings.
Client-ID: Copy from NextCloud
Client-Secret: Copy from NextCloud
Authorize URL: https://nextcloud.example.com/index.php/apps/oauth2/authorize
Token URL: https://nextcloud.example.com/index.php/apps/oauth2/api/v1/token
User API URL: https://nextcloud.example.com/index.php/ocs/v1.php/cloud/users
Username Key: ocs.data.id
Name Key: ocs.data.displayname
Email Key: ocs.data.email
User ID Key: ocs.data.id
Allow Account Creation: X
Allow account creation only for those domains: example.com
Please tell me if you need more informations.
Request-List:
https://kanboard.example.com/?controller=OAuthController&action=handler&plugin=OAuth2
https://nextcloud.example.com/index.php/apps/oauth2/authorize?response_type=code&client_id=xxxxxx&redirect_uri=https%3A%2F%2Fkanboard.example.com%2F%3Fcontroller%3DOAuthController%26action%3Dhandler%26plugin%3DOAuth2&scope=&state=xxxxxx
Now I see the NextCloud authorize screen and I click on it
https://nextcloud.example.com/index.php/login/flow
https://kanboard.example.com/?controller=OAuthController&action=handler&plugin=OAuth2?state=xxxxxx&code=xxxxxx
On this Request I get error message.
@fanningert Did you ever get this to work? I tried following some other tutorials that are similar, see (https://help.nextcloud.com/t/nextcloud-oidc-oauth2-authentification/14852/11), but I also get an error.
Differences I see are: Name Key: ocs.data.display-name (with a - ) User API URL: https://nextcloud.example.com/ocs/v2.php/cloud/user?format=json Edit: User API URL: https://nextcloud.example.com/index.php/ocs/v2.php/cloud/user?format=json is the same.
Edit: ah, and that I didn't put the index.php in the authorize and token URL... with that I can go though the auth process on the Nextcloud side of things, but upon redirection to Kanboard I also get the Internal Error: Action not implemented message on a white page.
I did a little poking around, and I'm 99% sure this is actually a bug in Nextcloud: nextcloud/server#17885.
In the meantime, you should be able to work around this issue within Kanboard by enabling URL rewriting, which will give you a Callback URL that doesn't already have a '?' in it (you'll need to remove and re-add Kanboard as an OAuth2 client with Nextcloud after you'll do this).
I did a little poking around, and I'm 99% sure this is actually a bug in Nextcloud: nextcloud/server#17885.
That issue was resolved. :+1: Has anyone tested since?