Web: No fragment in the OpenID Connect redirect uri allowed

Created on 31 Jan 2019  路  6Comments  路  Source: owncloud/web

According to https://tools.ietf.org/html/rfc6749#section-3.1.2 it is not allowed to have a fragment in the redirect uri.

We need to change this asap to ensure compatibility with any OpenID Connect Providers out there

THX @labkode for the hint

Bug

Most helpful comment

I found the issue thanks to running this certified OpenID server:
https://github.com/ory/hydra/releases

Steps to reproduce:

DATABASE_URL=memory hydra serve --dangerous-force-http all &
# listens on http://0.0.0.0:4445
hydra clients create --endpoint http://0.0.0.0:4445 --id example-app --callbacks 'http://localhost:8000/#/oidc-callback'
Command failed because status code 201 was expected but code 400 was received.

Response payload:

{
        "error": "invalid_request",
        "error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed",
        "error_hint": "Redirect URIs must not contain fragments (#)",
        "status_code": 400,
        "request_id": ""
}

All 6 comments

I found the issue thanks to running this certified OpenID server:
https://github.com/ory/hydra/releases

Steps to reproduce:

DATABASE_URL=memory hydra serve --dangerous-force-http all &
# listens on http://0.0.0.0:4445
hydra clients create --endpoint http://0.0.0.0:4445 --id example-app --callbacks 'http://localhost:8000/#/oidc-callback'
Command failed because status code 201 was expected but code 400 was received.

Response payload:

{
        "error": "invalid_request",
        "error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed",
        "error_hint": "Redirect URIs must not contain fragments (#)",
        "status_code": 400,
        "request_id": ""
}

I see two solutions:

I'd vote for solution 1 - any objections @tempelgogo @scramb - THX

I think we should get rid of this relict in our URLs & switch to History Mode.
I don't like that hash in our URL, anyway.

With little effort we're able to support it in dev mode. You're right that we need to adopt all server config's, but it's essentially just if not static asset, fallback to index.html/$1/ in almost all web servers, because vue-router will handle the url after init.

It's supported within our target platform: https://caniuse.com/#feat=history

That damn callback.html approach is hacky as hell :boom:

Let's try to get solution 2 running .... I'll give this a shot tomorrow

@labkode while this is not the final solution you could still give #751 a try

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PVince81 picture PVince81  路  7Comments

individual-it picture individual-it  路  5Comments

DeepDiver1975 picture DeepDiver1975  路  3Comments

ishank011 picture ishank011  路  8Comments

labkode picture labkode  路  8Comments