<commit_before><commit_msg>add instructions for auth integration<commit_after># Blockstack Auth

## How to Integrate

### Single-page Apps

1) Install `blockstack.js`:

```bash
npm install blockstack --save
```

2) Import Blockstack into your project

```js
import blockstack from 'blockstack'
```

3) Include the logic to (a) request the user to sign in (b) handling the auth response

```js
if (blockstack.isUserSignedIn()) {
  blockstack.loadUserData(function(userData) {
    showProfile(userData.profile)
  })
} else if (blockstack.isSignInPending()) {
  blockstack.signUserIn(function(userData) {
    window.location = window.location.origin
  })
}
```

### Client-server Apps

Coming soon.

## Examples

### Single-page Apps

- [Hello, Blockstack](https://github.com/blockstack/blockstack.js/blob/master/tests/browserTests/auth/app.js#L18)

### Client-server Apps

- [Blockstack Forum](https://forum.blockstack.org)
{'fraction_non_alphanumeric': 0.13789359391965256, 'fraction_numerical': 0.0054288816503800215, 'mean_word_length': 4.8354430379746836, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '47974', 'n_tokens_mistral': 308, 'n_tokens_neox': 291, 'n_words': 72}