Skip to content

Commit

Permalink
ReadMe update with SSO example
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Tang committed Oct 6, 2022
1 parent 745b086 commit fba16ea
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,35 @@ import { DiscussionEmbed } from 'disqus-react';

This component is limited to one instance in the DOM at a time and will handle updates to both the `config` and `shortname` props and reload appropriately with the new discussion thread.

### DiscussionEmbed with SSO

This is an example for setting up the DiscussionEmbed component with SSO. This example config is also used on the Disqus SSO example found here: https://disqus-sso-demo.glitch.me/.

```js
import { DiscussionEmbed } from 'disqus-react';

<DiscussionEmbed
shortname='example'
config={
{
url: this.props.article.url,
identifier: this.props.article.id,
title: this.props.article.title,
language: 'zh_TW' //e.g. for Traditional Chinese (Taiwan),
sso: {
name: 'SampleNews',
button: 'http://example.com/images/samplenews.gif',
icon: 'http://example.com/favicon.png',
url: 'http://example.com/login/',
logout: 'http://example.com/logout/',
profile_url: 'http://example.com/profileUrlTemplate/{username}',
width: '800',
height: '400',
}
}
}
/>
```

### CommentCount

Expand Down

0 comments on commit fba16ea

Please sign in to comment.