bettiolo / oauth-signature-js

JavaScript OAuth 1.0a signature generator (RFC 5849) for node and the browser
https://www.npmjs.com/package/oauth-signature
BSD 3-Clause "New" or "Revised" License
232 stars 71 forks source link

oauthSignature is undefined in react-native #40

Open imsateesh opened 6 years ago

imsateesh commented 6 years ago

This may seem very basic but I'm stuck over here. I am getting the error oauthSignaure is undefined. I am trying to import it like: import oauthSignature from 'oauth-signature';

Also I have tried to use require with require() as well, but it doesn't work. Please let me know how can I use it with react-native?

bettiolo commented 6 years ago

I never used it with react-native I will have to give it a go. Maybe the way it is exported makes it not compatible.

omniscient commented 6 years ago

We had the same problem with Aurelia. We had to prepend the JS file in the build system... I do not know react at all, but there might be a way to just do a similar thing

shotozuro commented 6 years ago

Hi.. I use this library too and it works well in my react-native project. Maybe you should restart the packager first, and import it like you did before:

import oauthSignature from 'oauth-signature';