1
0
Fork 0
mirror of synced 2024-10-02 10:16:27 +13:00

Fix the routing for the default OAuth2 pages

This commit is contained in:
Steven Nguyen 2023-06-02 14:22:28 -07:00 committed by Christy Jacob
parent b68f601240
commit e87e2fc16d
2 changed files with 13 additions and 1 deletions

View file

@ -6,10 +6,11 @@ use Utopia\App;
App::get('/console/*')
->alias('/')
->alias('auth/*')
->alias('/invite')
->alias('/login')
->alias('/recover')
->alias('/register')
->alias('/register/*')
->groups(['web'])
->label('permission', 'public')
->label('scope', 'home')

View file

@ -159,4 +159,15 @@ class HTTPTest extends Scope
$this->assertIsString($body['server-ruby']);
$this->assertIsString($body['console-cli']);
}
public function testDefaultOAuth2()
{
$response = $this->client->call(Client::METHOD_GET, '/auth/oauth2/success', $this->getHeaders());
$this->assertEquals(200, $response['headers']['status-code']);
$response = $this->client->call(Client::METHOD_GET, '/auth/oauth2/failure', $this->getHeaders());
$this->assertEquals(200, $response['headers']['status-code']);
}
}