Skip to content

Commit

Permalink
[Docs] Improve GitHub Setup Instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-G committed Sep 1, 2016
1 parent 97d51c4 commit 3efbcd3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,25 @@ Work-in-Progress Real World Example for Swift Flow.

This project is currently driving some API changes, so it is using newer APIs than provided by the latest Swift Flow releases.

Successful API changes will be merged into the Swift Flow projects.
Successful API changes will be merged into the Swift Flow projects.

# GitHub Configuration Instructions

This demo requires you to create a GitHub API token that provides the app with access to content on GitHub.

Create an OAuth application on GitHub and note the **Client ID** and the **Client Secret**; also make sure to set the **Authorization callback URL** to `swiftflowgithub://success` as shown here:

![](RepoAssets/GitHub_OAuthSetup.png)

Open `Credentials.swift` and enter the **Client ID** and the **Client Secret** of your OAuth application:

```swift
// In order to try out this demo you need to create an OAuth application on GitHub and provide
// the credentials here.
//
// For more instructions take a look at the README.md in this git repository.
//
// Insert GitHub Token and Secret Here
let gitHubClientId = ""
let gitHubClientSecret = ""
```
Binary file added RepoAssets/GitHub_OAuthSetup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions SwiftFlowGitHubBrowser/Reducers/AuthenticationReducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ func authenticationReducer(state: AuthenticationState?, action: Action) -> Authe

func initialAuthenticationState() -> AuthenticationState {
let config = OAuthConfiguration(
token: gitHubToken,
secret: gitHubSecret,
token: gitHubClientId,
secret: gitHubClientSecret,
scopes: ["repo", "read:org"]
)

Expand Down

0 comments on commit 3efbcd3

Please sign in to comment.