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

How to trigger the OAuth flow? #495

Open
tcurdt opened this issue Jul 3, 2024 · 0 comments
Open

How to trigger the OAuth flow? #495

tcurdt opened this issue Jul 3, 2024 · 0 comments
Labels
support Questions, discussions, and general support

Comments

@tcurdt
Copy link

tcurdt commented Jul 3, 2024

Runtime

node

Runtime version

node:20-alpine

Module version

"@hapi/bell": "13.0.2"

Used with

"@hapi/hapi": "21.3.10"

Any other relevant information

The tutorial is a 404:

http://mph-web.de/social-signup-with-twitter-using-hapi-js/

How can we help?

The documentation feels a bit lacking. At least from the docs I don't see how to actually trigger the oauth flow.
We have added the strategy to the auth

  server.auth.strategy('jwt', 'jwt', {
    key: Config.keys.auth,
    verifyOptions: { algorithms: ['HS256'] },
    validate
  })

  server.auth.strategy('github', 'bell', {
    provider: 'github',
    password: Config.oauth.github.cookieSecret,
    clientId: Config.oauth.github.clientId,
    clientSecret: Config.oauth.github.clientSecret,
    location: () => Config.oauth.github.responseLocation
    // isSecure: false,
    // isSameSite: 'Lax',
  })

...and now we want to offer a button that should start the auth oauth flow.
From the docs I don't see how.

I assume the provider auth url needs to be constructed and the user needs to be redirected to that.

What am I missing?

@tcurdt tcurdt added the support Questions, discussions, and general support label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions, discussions, and general support
Projects
None yet
Development

No branches or pull requests

1 participant