hapijs / hapijs/bell

How to trigger the OAuth flow?

Open
#495 0 comments 0 reactions 0 assignees View on GitHub
support
Dominant language
JavaScript
Stars
616
Forks
210
Avg merge
3m
Merged PRs (30d)
3

Description

### 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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.