feat: allowing post method into auth refresh api

Signed-off-by: Antonio Musolino <antoniomusolino007@gmail.com>
This commit is contained in:
Antonio Musolino
2022-07-05 15:33:29 +02:00
parent d41a568a29
commit fe8e025af5
3 changed files with 7 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-backend': minor
---
Allowed post method on /refresh path
+1
View File
@@ -350,6 +350,7 @@ router.get('/auth/providerA/handler/frame');
router.post('/auth/providerA/handler/frame');
router.post('/auth/providerA/logout');
router.get('/auth/providerA/refresh'); // if supported
router.post('/auth/providerA/refresh'); // if supported
```
As you can see each endpoint is prefixed with both `/auth` and its provider
@@ -140,6 +140,7 @@ export async function createRouter(
}
if (provider.refresh) {
r.get('/refresh', provider.refresh.bind(provider));
r.post('/refresh', provider.refresh.bind(provider));
}
router.use(`/${providerId}`, r);