Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix authProvider doc #196

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions blog/2020-03-custom-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ The constructor of our class will look something like this:

```js
class MyCustomProvider {
constructor(options) {
this.authProvider = 'myunsplash'; // the name of our provider (lowercased)
}
static authProvider = 'google'; // the name of the OAuth provider to use (lowercased)
// ...
}
```
Expand Down Expand Up @@ -305,9 +303,7 @@ const request = require('request');
const BASE_URL = 'https://api.unsplash.com';

class MyCustomProvider {
constructor(options) {
this.authProvider = 'myunsplash';
}
static authProvider = 'unsplash'; // the name of the OAuth provider to use (lowercased)

list({ token, directory }, done) {
const path = directory ? `/${directory}/photos` : '';
Expand Down
4 changes: 3 additions & 1 deletion docs/companion.md
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,9 @@ with an `Error`):
The class must also have:

- A unique `static authProvider` string property - a lowercased value which
typically indicates the name of the provider (e.g “dropbox”).
indicates name of the [`grant`](https://github.com/simov/grant) OAuth2
provider to use (e.g `google` for Google). If your provider doesn’t use
OAuth2, you can omit this property.
- A `static` property `static version = 2`, which is the current version of the
Companion Provider API.

Expand Down
Loading