카테고리 없음

[트위터] 이메일을 통한 Hapi Bell Twitter Auth

필살기쓰세요 2021. 1. 14. 21:14

이 코드는 저에게 효과적입니다.

server.auth.strategy('twitter', 'bell', {
    provider: 'twitter',
        config: {
                getMethod: 'account/verify_credentials',
                        getParams: {include_email:'true' },//doesn't work without quotes!
                            },
                                password: 'secret_cookie_encryption_password', //Use something more secure in production
                                    clientId: secret.twitterId,
                                        clientSecret: secret.twitterSecret,
                                            isSecure: false //Should be set to true (which is the default) in production
                                            });
                                            

Twitter 애플리케이션 설정에서 필요한 권한 (사용자에게 이메일 주소 요청)을 허용하는 것을 잊지 마십시오.



출처
https://stackoverflow.com/questions/39915886