-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: add facebook provider guide #111
base: main
Are you sure you want to change the base?
Conversation
|
||
## Frontend integration | ||
|
||
To enable a login with LinkedIn in your frontend application we recommend using either our pre-built UI as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To enable a login with LinkedIn in your frontend application we recommend using either our pre-built UI as | |
To enable a login with Facebook in your frontend application we recommend using either our pre-built UI as |
<Tab title="Hanko Elements"> | ||
We recommend following one of our [quickstart guides](https://docs.hanko.io/quickstarts) to integrate | ||
the `<hanko-auth>` component from our `@teamhanko/hanko-elements` package in your frontend application . | ||
On successful integration, the component will display a button for signing in with `LinkedIn` in the login view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On successful integration, the component will display a button for signing in with `LinkedIn` in the login view | |
On successful integration, the component will display a button for signing in with `Facebook` in the login view |
<Tab title="Hanko Frontend SDK"> | ||
When building your own UI, you can use the `@teamhanko/hanko-frontend-sdk` to initialize third party sign in. | ||
Create a [`Hanko` client](https://teamhanko.github.io/hanko/jsdoc/hanko-frontend-sdk/Client.html) instance and call the | ||
`thirdParty.auth` method with `linkedin` as your provider and the target URL in your app you want to redirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`thirdParty.auth` method with `linkedin` as your provider and the target URL in your app you want to redirect | |
`thirdParty.auth` method with `facebook` as your provider and the target URL in your app you want to redirect |
// in the Hanko Cloud Console | ||
const hanko = new Hanko("<your_hanko_api_url>"); | ||
|
||
async function signInWithLinkedIn() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async function signInWithLinkedIn() { | |
async function signInWithFacebook() { |
try { | ||
// the redirect url argument must be one of the allowed redirect URLs | ||
// configured in the previous step. | ||
await hanko.thirdParty.auth("linkedin", "<your_redirect_url>"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await hanko.thirdParty.auth("linkedin", "<your_redirect_url>"); | |
await hanko.thirdParty.auth("facebook", "<your_redirect_url>"); |
No description provided.