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

feat: add facebook provider guide #111

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lfleischmann
Copy link
Member

No description provided.


## Frontend integration

To enable a login with LinkedIn in your frontend application we recommend using either our pre-built UI as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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>");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
await hanko.thirdParty.auth("linkedin", "<your_redirect_url>");
await hanko.thirdParty.auth("facebook", "<your_redirect_url>");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants