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

Desktop application does not enter "invalid_request" #342

Open
sciapuscio opened this issue Jul 27, 2022 · 0 comments
Open

Desktop application does not enter "invalid_request" #342

sciapuscio opened this issue Jul 27, 2022 · 0 comments

Comments

@sciapuscio
Copy link

sciapuscio commented Jul 27, 2022

Steps to reproduce

1.Run app
2. Type the domain
3. Try to login

Expected behaviour

Login by Auth 2.0

Actual behaviour

I installed Oauth 2.0 successfully. The only drawback is that when I press the Authorize button, it throws me the following error:

URL: http://localhost:51135/?code=pw8SfOzqRiT18ouKnRepuL5WqgJy6rt5xBtfl8ybt8xpYQ6zQbItdEuvAdbqn18H&state=rrw88PVT_A_2KW2APcmNHddjTTYbbcZuRAuaZHYwnRc%3D

Response:

login error
Error returned from server: invalid_request

Server configuration

Operating system: cPanel & WHM v104.0.6 (STANDARD)

Web server: Apache Web Server

Database: 5.7.38 - MySQL Community Server (GPL)

PHP version: PHP 7.4 ( ea-php74 )

ownCloud version: ownCloud 10.10.0 (stable)

Storage backend (external storage): no

  • The content of config/config.php:

$CONFIG = array (
'token_auth_enforced' => false,
'csrf.disabled' => true,
'strict_login_enforced' => true,
'instanceid' => 'xxxxxxxxxxx',
'passwordsalt' => 'xxxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxxxxxxx',
'trusted_domains' =>
array (
0 => 'xxxxxx.com.ar',
1 => 'xxx.105.xxx.148',
1 => 'www.xxxxxx.com.ar'
),
'datadirectory' => '/home/xxxxxxx/public_html/data',
'overwrite.cli.url' => 'https://xxxxx.com.ar',
'dbtype' => 'mysql',
'version' => '10.10.0.3',
'dbname' => 'xxxxxxxxxxxx',
'dbhost' => '127.0.0.1',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'xxxxxxxxxxxxxxxx',
'dbpassword' => 'xxxxxxxxxxxxxx',
'allow_user_to_change_mail_address' => '',
'logtimezone' => 'UTC',
'apps_paths' =>
array (
0 =>
array (
'path' => '/home/xxxxxx/public_html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/home/xxxxx/public_html/apps-external',
'url' => '/apps-external',
'writable' => true,
),
),
'installed' => true,
);


{
            "id": "oauth2",
            "name": "OAuth2",
            "summary": "OAuth2 token-based authorization interface",
            "description": "OAuth2 is the open industry-standard protocol for secure authorization of clients. It can be used as a way for users to grant web services or applications access to their data stored in ownCloud. The use of OAuth2 in ownCloud greatly enhances security while facilitating the integration of third party applications or web services:\n\n- Connect ownCloud clients (Desktop, Android, iOS) through a standardized and secure authorization flow - Provide a user authorization interface for developers to facilitate the integration of ownCloud in third party applications\n\n### Benefits provided by the OAuth2 interface\n\n- No user passwords are being stored in ownCloud clients or third party web applications\n\nInstead of connecting clients with username\/password, a user only needs to provide the information once in the browser. The respective client is then provided with a unique access token which is used for future connections to the ownCloud server. ownCloud clients or third party applications never get to know the actual login credentials.\n\n- The use of different access tokens per client provides the ability to selectively revoke user sessions\n\nWhen using OAuth2 a unique access token is generated for each device or third party application. Users can check their authorized clients in the personal settings and have the ability to selectively invalidate access tokens when e.g. a device is lost. This strengthens control and access security significantly.\n\n### Resources - [OAuth - Wikipedia](https:\/\/en.wikipedia.org\/wiki\/OAuth) - [OAuth protocol web page](https:\/\/oauth.net\/2\/)",
            "licence": "AGPL",
            "author": "Project Seminar \"sciebo@Learnweb\" of the University of M\u00fcnster, Thomas M\u00fcller",
            "version": "0.5.2",
            "namespace": "OAuth2",
            "category": "security",
            "website": "https:\/\/github.com\/owncloud\/oauth2",
            "bugs": "https:\/\/github.com\/owncloud\/oauth2\/issues",
            "repository": {
                "@attributes": {
                    "type": "git"
                },
                "@value": "https:\/\/github.com\/owncloud\/oauth2.git"
            },
            "screenshot": [
                "https:\/\/raw.githubusercontent.com\/owncloud\/screenshots\/master\/oauth2\/oauth2.jpg",
                "https:\/\/raw.githubusercontent.com\/owncloud\/screenshots\/master\/oauth2\/ownCloud-oauth2-app-auth-request.jpg",
                "https:\/\/raw.githubusercontent.com\/owncloud\/screenshots\/master\/oauth2\/ownCloud-oauth2-app-authorized.jpg"
            ],
            "dependencies": {
                "owncloud": {
                    "@attributes": {
                        "min-version": "10.3",
                        "max-version": "10"
                    }
                }
            },
            "types": [
                "authentication"
            ],
            "auth-modules": {
                "module": "OCA\\OAuth2\\AuthModule"
            },
            "settings": {
                "personal": "OCA\\OAuth2\\Panels\\PersonalPanel",
                "admin": "OCA\\OAuth2\\Panels\\AdminPanel"
            },
            "background-jobs": {
                "job": "OCA\\OAuth2\\BackgroundJob\\CleanUp"
            },
            "use-migrations": "true",
            "commands": [
                "OCA\\OAuth2\\Commands\\AddClient",
                "OCA\\OAuth2\\Commands\\RemoveClient",
                "OCA\\OAuth2\\Commands\\ListClients",
                "OCA\\OAuth2\\Commands\\ModifyClient"
            ],
            "info": [],
            "remote": [],
            "public": [],
            "repair-steps": {
                "install": [],
                "pre-migration": [],
                "post-migration": [],
                "live-migration": [],
                "uninstall": []
            },
            "two-factor-providers": [],
            "_cached": true,
            "groups": null,
            "active": true,
            "level": 100,
            "removable": true,
            "internal": false,
            "preview": "\/apps\/oauth2\/img\/app.svg",
            "previewAsIcon": true,
            "appconfig": {
                "enabled": "yes",
                "installed_version": "0.5.2",
                "types": "authentication"
            }
        },

- **List of activated apps:**
Oauth2.0

- **Are you using encryption:** yes/no
- NO
- **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
NO


### Client configuration

Client configuration
Client version: Version 2.10.1 (Build 7187)

Operating system: Windows 11 Pro

OS language: Spanish

Installation path of client: C:\Program Files\ownCloud
- **Sync Client logs:**

ref. https://doc.owncloud.org/desktop/latest/troubleshooting.html#log-files

 No logs- 
### Logs



#### ownCloud log (data/owncloud.log)

Insert your ownCloud log here

27T03:16:29+00:00","remoteAddr":"179.30.155.14","user":"--","app":"PHP","method":"POST","url":"\/index.php\/apps\/oauth2\/$
{"reqId":"540d124f-6641-4d5d-b8e7-1358c88044da","level":3,"time":"2022-07-27T03:43:07+00:00","remoteAddr":"179.30.155.14","user":"--","app":"PHP","method":"POST","url":"\/index.php\/apps\/oauth2\/$



#### Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) HTML RESPONSE

image

login error
Error returned from server: invalid_request

Javascript Console:
Failed to load resource: net::ERR_CONNECTION_REFUSED
localhost/:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)

@sciapuscio sciapuscio changed the title Desktop application does not enter Desktop application does not enter "invalid_request" Jul 27, 2022
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

No branches or pull requests

1 participant