<commit_before># OpenID Connect Authentication Example

This example authenticates using the
[Google Identity Platform](https://developers.google.com/identity/), which
implements OpenID Connect.

The client application opens a browser which allows the user to authenticate. On
successful authentication, the browser is redirected to connect to a web server
running on localhost. The authentication code is extracted from the query string
of the redirection URL and returned to the main thread.

TODO(#855): The authentication code can then be exchanged for an identity token
by the authentication server.

The client can be executed using:

```bash

cargo run --package auth_client -- --client-id $YOUR_CLIENT_ID

```

This requires a valid OAuth Client ID, which can be created as described in
https://developers.google.com/identity/protocols/oauth2/openid-connect#getcredentials<commit_msg>Add sample Oauth Client ID to auth example (#898)<commit_after># OpenID Connect Authentication Example

This example authenticates using the
[Google Identity Platform](https://developers.google.com/identity/), which
implements OpenID Connect.

The client application opens a browser which allows the user to authenticate. On
successful authentication, the browser is redirected to connect to a web server
running on localhost. The authentication code is extracted from the query string
of the redirection URL and returned to the main thread.

TODO(#855): The authentication code can then be exchanged for an identity token
by the authentication server.

The client can be executed using:

```bash
cargo run --package=auth_client -- --client-id=691249393555-0h52jim9ni9clkpd5chi82q9ccn44ebm.apps.googleusercontent.com
```

This requires a valid OAuth Client ID, which can be created as described in
https://developers.google.com/identity/protocols/oauth2/openid-connect#getcredentials

The Client ID (and corresponding Client Secret) from the example script above
can be managed here (only accessible to authorized users):
https://pantheon.corp.google.com/apis/credentials/oauthclient/691249393555-0h52jim9ni9clkpd5chi82q9ccn44ebm.apps.googleusercontent.com?project=oak-ci
{'fraction_non_alphanumeric': 0.06287563569116968, 'fraction_numerical': 0.026352288488210817, 'mean_word_length': 5.479041916167665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, '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': '3202020', 'n_tokens_mistral': 604, 'n_tokens_neox': 564, 'n_words': 243}