<commit_before># Logout

You can log a user out from Auth0 by redirecting to the following URL:

    https://@@account.namespace@@/v2/logout

This will clear any single sign-on cookies set by Auth0 for that user.
If you also want to log the user out of their identity provider, add a `federated` query string parameter to the logout URL:

    https://@@account.namespace@@/v2/logout?federated

> If you are working with social identity providers such as Google or Facebook, make sure to set your own Client ID and Secret in the Auth0 dashboard; otherwise the logout won't work.

If you specify a `returnTo` parameter, Auth0 will redirect to that URL after logging out:

    https://@@account.namespace@@/v2/logout?returnTo=http://somewhere

> The returnTo parameter won't work for social providers, since there is no way to specify that.

Facebook has some special requirements to trigger a logout. You will have to build the logout URL as described below:

    https://@@account.namespace@@/v2/logout?
          returnTo=url_encode(https://@@account.namespace@@/logout?returnTo=http://yoursite)
          &access_token=[facebook access_token]

> Make sure to properly encode the `returnTo` parameter.<commit_msg>Add missing ?federated to Facebook logout URL<commit_after># Logout

You can log a user out from Auth0 by redirecting to the following URL:

    https://@@account.namespace@@/v2/logout

This will clear any single sign-on cookies set by Auth0 for that user.
If you also want to log the user out of their identity provider, add a `federated` query string parameter to the logout URL:

    https://@@account.namespace@@/v2/logout?federated

> If you are working with social identity providers such as Google or Facebook, make sure to set your own Client ID and Secret in the Auth0 dashboard; otherwise the logout won't work.

If you specify a `returnTo` parameter, Auth0 will redirect to that URL after logging out:

    https://@@account.namespace@@/v2/logout?returnTo=http://somewhere

> The returnTo parameter won't work for social providers, since there is no way to specify that.

Facebook has some special requirements to trigger a logout. You will have to build the logout URL as described below:

    https://@@account.namespace@@/v2/logout?federated&
          returnTo=url_encode(https://@@account.namespace@@/logout?returnTo=http://yoursite)
          &access_token=[facebook access_token]

> Make sure to properly encode the `returnTo` parameter.
{'fraction_non_alphanumeric': 0.08022690437601297, 'fraction_numerical': 0.006482982171799027, 'mean_word_length': 4.219873150105708, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '848806', 'n_tokens_mistral': 674, 'n_tokens_neox': 651, 'n_words': 305}