# AWS Cognito OAuth

**URL:** <https://forums.rocket.chat/t/aws-cognito-oauth/11216>\
**Category:** Community Support\
**Created:** [May 21, 2021, 9:15am UTC](https://forums.rocket.chat/t/aws-cognito-oauth/11216 "2021-05-21T09:15:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClemontX](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@ClemontX](https://forums.rocket.chat/u/ClemontX)\
**Post date:** [May 21, 2021, 9:15am UTC](https://forums.rocket.chat/t/aws-cognito-oauth/11216/1 "2021-05-21T09:15:51Z")

</div>

### Description

I have a Rokcetchat instance running and i want to use AWS Cognito as a OAuth Provider.  
It should work but there is one problem as shown in the logs below.

### Server Setup Information

- Version of Rocket.Chat Server: 3.14.1
- Operating System: Ubuntu 20.04, microk8s-Cluster
- Deployment Method: docker/kubernetes
- Number of Running Instances: 1
- DB Replicaset Oplog: activated
- NodeJS Version: v12.22.1
- MongoDB Version: 4.0.24
- Proxy: traefik
- Firewalls involved: no

### Any additional Information

```
{"line":"405","file":"oauth_server.js","message":"Error in OAuth Server: Failed to fetch identity from amazon at https://cxde-sso.auth.eu-west-1.amazoncognito.com/oauth2/userInfo. failed [401] {\"error\":\"invalid_token\",\"error_description\":\"Access token does not contain openid scope\"}","time":{"$date":1621586869805},"level":"warn"}
Exception while invoking method login Error: Failed to fetch identity from amazon at https://cxde-sso.auth.eu-west-1.amazoncognito.com/oauth2/userInfo. failed [401] {"error":"invalid_token","error_description":"Access token does not contain openid scope"}

```

---

<div class="post-metadata">

**Author:** ![john.crisp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/john.crisp/32/2711_2.png) [@john.crisp](https://forums.rocket.chat/u/john.crisp)\
**Post date:** [May 21, 2021, 10:10am UTC](https://forums.rocket.chat/t/aws-cognito-oauth/11216/2 "2021-05-21T10:10:58Z")

</div>

Hi.

I can see you are chatting on this link in open.rocket:

> **[Rocket.Chat](https://open.rocket.chat/channel/support?msg=JhComGsMfvpfyqY28)**

Probably best to continue there.
