Aqueduct template db_and_auth not rendering login form

43 Views Asked by At

I am working on setting up OAuth 2.0 for aqueduct and want to start with a working example. The template db_and_auth is suppose to serve this purpose.

I have followed the readme instructions and connected my database and updated the migration. also I have registered OAuth 2.0 clients in the application database as the readme describes.

The template comes with a route in the channel.dart

router
        .route("/auth/form")
        .link(() => AuthRedirectController(authServer, delegate: this));

The AuthRedirectController is set up to render a html page (web/login.html) which is part of the template.

However every time I send a get request to this route it returns with a 400 error saying Error unsupported_response_type in the browser. Additionally in the readme file it only shows testing auth end points using curl. Why would this template include a rendered login page without mention of it in the readme? Any help with this would be much appreciated.

1

There are 1 best solutions below

0
vanlooverenkoen On

The login form will only be rendered when you pass the correct response_type like so:

http://localhost:8888/auth/form?response_type=token