<commit_before>[Table of contents](README.md#table-of-contents)

# Account types

## Google

Example creation of google account_type for the stack at .mycozy.cloud

* Go to https://console.developers.google.com
* Select or Create Project (up left near the logo)
* Enable desired APIs (TBD with usages)
* Click "Credentials"
* Create credentials > Oauth Client ID > Web application
* Set redirectURI to https://oauthcallback.mycozy.cloud/accounts/google/redirect
* Copy and paste provided Client ID and Client Secret.

Then save the data in the console

```
http PUT localhost:5984/secrets%2Fio-cozy-accounts_types/google
grant_mode=authorization_code
redirect_uri="https://oauthcallback.mycozy.cloud/accounts/google/redirect"
token_endpoint="https://www.googleapis.com/oauth2/v4/token"
auth_endpoint="https://accounts.google.com/o/oauth2/v2/auth"
client_id=$CLIENT_ID
client_secret=$CLIENT_SECRET
```<commit_msg>Add token_mode to account_types doc<commit_after>[Table of contents](README.md#table-of-contents)

# Account types

## Google

Example creation of google account_type for the stack at .mycozy.cloud

* Go to https://console.developers.google.com
* Select or Create Project (up left near the logo)
* Enable desired APIs (TBD with usages)
* Click "Credentials"
* Create credentials > Oauth Client ID > Web application
* Set redirectURI to https://oauthcallback.mycozy.cloud/accounts/google/redirect
* Copy and paste provided Client ID and Client Secret.

Then save the data in the console

```
http PUT localhost:5984/secrets%2Fio-cozy-accounts_types/google
grant_mode=authorization_code
redirect_uri="https://oauthcallback.mycozy.cloud/accounts/google/redirect"
token_mode=basic
token_endpoint="https://www.googleapis.com/oauth2/v4/token"
auth_endpoint="https://accounts.google.com/o/oauth2/v2/auth"
client_id=$CLIENT_ID
client_secret=$CLIENT_SECRET
```
{'fraction_non_alphanumeric': 0.10466988727858294, 'fraction_numerical': 0.00966183574879227, 'mean_word_length': 5.802919708029197, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1962450', 'n_tokens_mistral': 599, 'n_tokens_neox': 584, 'n_words': 149}