Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hzalaz committed Jun 9, 2016
1 parent 209dd90 commit 54a9743
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,38 @@ Auth0
}
```

### Logging

To enable Auth0.swift to log HTTP request and OAuth2 flow for debugging just add the following:

```swift
Auth0.enableLogging()
```

Then for a OAuth2 authentication you'll see in the console:

```
Safari: https://samples.auth0.com/authorize?.....
URL: com.auth0.oauth2://samples.auth0.com/ios/com.auth0.OAuth2/callback?...
POST https://samples.auth0.com/oauth/token HTTP/1.1
Content-Type: application/json
{"code":"...","client_id":"...","grant_type":"authorization_code","redirect_uri":"com.auth0.OAuth2:\/\/samples.auth0.com\/ios\/com.auth0.OAuth2\/callback","code_verifier":"..."}
HTTP/1.1 200
Pragma: no-cache
Content-Type: application/json
Strict-Transport-Security: max-age=3600
Date: Thu, 09 Jun 2016 19:04:39 GMT
Content-Length: 57
Cache-Control: no-cache
Connection: keep-alive
{"access_token":"...","token_type":"Bearer"}
```

> Only set this flag for **DEBUG** only or you'll be leaking user's credentials in the device log.
## What is Auth0?

Auth0 helps you to:
Expand Down

0 comments on commit 54a9743

Please sign in to comment.