Skip to content

The Twitter get email address rule does not work with Oauh2 #306

@KenEucker

Description

@KenEucker

I agree with the Auth0 Code of Conduct.

Description

The get email address from Twitter rule only works with Oauth 1.0 and Twitter v2 uses Oauth 2.0.

Reproduction

This code:
(from: https://github.com/auth0/rules/blob/master/src/rules/get-twitter-email.js#29)

...
const _ = require('lodash');
const request = require('request');
const oauth = require('oauth-sign');
const uuid = require('uuid');

const url = 'https://api.twitter.com/1.1/account/verify_credentials.json';
...

Produces this error:

Screen Shot 2022-03-20 at 8 45 32 AM

When using the new Twitter API and attempting to get email addresses with user logins, which you can log into without issue not using this rule:

Screen Shot 2022-03-20 at 8 46 04 AM

Environment

  • Version of this library used:
    vLatest from the "Enrich" rules from the Auth0 dashboard:

Screen Shot 2022-03-20 at 8 45 46 AM

  • Version of the platform or framework used, if applicable:
    IDK
  • Other relevant versions (language, server software, OS, browser):
    N/A
  • Other modules/plugins/libraries that might be involved:
    N/A

** Next Steps **

I am going to attempt to come up with an Oauth2 solution because I can't find anything on the internet that addresses this. I also searched this repository for mention of this issue but found nothing. I would welcome any collaborations or help or just feedback in general on this topic and if/when I get a working solution I can provide a PR for an additional javascript rule file for the Oauth2 flow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions