Heello / Issues

Bug and feature tracking
1 stars 0 forks source link

Provide developer tool to easily obtain a refresh code #7

Closed katanacrimson closed 7 years ago

katanacrimson commented 11 years ago

For the currently logged in user, the developer, being able to easily obtain a refresh code for one of your own applications would be very helpful when doing testing, especially unit testing.

katanacrimson commented 11 years ago

also for the record, the only other alternative to do this is for unit testing is to fake a full authorization, logging in, authorizing the application, and then firing off requests entirely programmatically which I've been forced to do myself.

Ugly solution but it works. Because of how refresh tokens are cycled out, I've no way to be able to continually test without faking the entire authentication process.

katanacrimson commented 11 years ago

I managed to clean my own code for this up quite a bit - only have to fake the initial authorization with Heello for unit testing.

However, it is... * shudder *

https://github.com/damianb/node-heello/blob/master/test/authed.js#L17

katanacrimson commented 11 years ago

I've split said code out into its own npm module.

Until there's something official from heello, it's published as npm package heello-refreshtoken. Ugly but it works for now.

https://github.com/damianb/heello-refreshtoken

It should be used _FOR TESTING PURPOSES ONLY_.