Skip to content

Commit 56148c3

Browse files
committed
Remove unsupported authParams from README
1 parent 1504ae5 commit 56148c3

File tree

1 file changed

+2
-35
lines changed

1 file changed

+2
-35
lines changed

README.md

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Pusher React Native Websocket Client
2+
3+
[![Latest Release](https://img.shields.io/github/v/release/pusher/pusher-websocket-react-native)](https://github.com/pusher/pusher-websocket-react-native/releases)
24
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/Pusher)
35
[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/pusher/pusher-websocket-react-native/master/LICENSE)
46
[![npm version](https://badge.fury.io/js/@pusher%2Fpusher-websocket-react-native.svg)](https://badge.fury.io/js/@pusher%2Fpusher-websocket-react-native)
@@ -38,7 +40,6 @@ a minimal application to connect to a channel and send events.
3840
- [Configuration](#configuration)
3941
- [`activityTimeout (double)`](#activitytimeout-double)
4042
- [`apiKey (string)`](#apikey-string)
41-
- [`authParams (Map)`](#authparams-map)
4243
- [`authEndpoint (string)`](#authendpoint-string)
4344
- [`cluster (string)`](#cluster-string)
4445
- [`useTLS (bool)`](#usetls-bool)
@@ -134,7 +135,6 @@ try {
134135
onDecryptionFailure,
135136
onMemberAdded,
136137
onMemberRemoved,
137-
// onAuthorizer,
138138
});
139139

140140
await pusher.subscribe({ channelName });
@@ -172,39 +172,6 @@ If no messages are received after this time period (in seconds), the ping messa
172172

173173
You can get your `API_KEY` and `API_CLUSTER` from the [Pusher Channels dashboard](https://dashboard.pusher.com/).
174174

175-
#### `authParams (Map)`
176-
177-
Allows passing additional data to authorizers. Supports query string params and headers (AJAX only). For example, the following will pass `foo=bar` via the query string and `baz: boo` via headers:
178-
179-
```typescript
180-
const pusher = Pusher.getInstance();
181-
await pusher.init(
182-
apiKey: API_KEY,
183-
cluster: API_CLUSTER,
184-
authParams: {
185-
params: { foo: 'bar' },
186-
headers: { baz: 'boo' }
187-
}
188-
});
189-
```
190-
191-
Additional parameters are to be sent when the channel authentication endpoint is called. When using [ajax authentication](https://pusher.com/docs/authenticating_users#ajax_authentication) the parameters are passed as additional `POST` parameters. When using [jsonp authentication](http://pusher.com/docs/authenticating_users#jsonp_authentication) the parameters are passed as `GET` parameters. This can be useful with web application frameworks that guard against [CSRF (Cross-site request forgery)](http://en.wikipedia.org/wiki/Cross-site_request_forgery).
192-
193-
CSRF
194-
195-
If you require a CSRF header for incoming requests to the private channel authentication endpoint on your server, you should add a CSRF token to the `auth` hash under `headers`. This applies to frameworks which use CSRF protection by default.
196-
197-
```typescript
198-
const pusher = await pusher.init(
199-
apiKey: API_KEY,
200-
cluster: API_CLUSTER,
201-
authParams: {
202-
params: { foo: 'bar' },
203-
headers: { 'X-CSRF-Token': 'SOME_CSRF_TOKEN' }
204-
}
205-
);
206-
```
207-
208175
#### `authEndpoint (string)`
209176

210177
The authEndpoint provides a URL that the

0 commit comments

Comments
 (0)