Closed iamkhalidbashir closed 3 years ago
Hi Khalid - this is great. Can you upgrade the package.json
version field to 1.4.0
also?
Also, whilst you're here, I was thinking this repository needs a bit of TLC.
My todo list with electron-auth-0-login is probably as follows
For the refactor I have a few ideas and wouldn't mind your input.
keytar
, which is then called via a proxy called codependency
. I've never felt very comfortable with this - codependency isn't in active development and in any case, not everyone may want to use keytar, as it appears there are security concerns on Windows.What we could do is replace the keytar
peer dependency with a keyService
parameter. This would accept either keytar
or a user-supplied module with a simple interface, e.g.
import keytar from 'keytar';
const auth = new ElectronAuth0Login({
...
// using keytar
keyService: keytar
// OR, using user-supplied service
keyService: {
getRefreshToken: (): Promise<string> => { ... },
deleteRefreshToken: (): Promise<void> => { ... }
}
});
Get rid of the dist
folder from source control and set up a proper CI pipeline using Travis, including possibly automating NPM releases
Open up the code to have HTTP and key storage injected, to enable proper unit tests. Right now the lack of good testability is what makes me most nervous when merging code.
Did you have any ideas or any feature requests?
Hi Khalid - this is great. Can you upgrade the
package.json
version field to1.4.0
also?
Done
2. Open up the code to have HTTP and key storage injected, to enable proper unit tests. Right now the lack of good testability is what makes me most nervous when merging code.
Yes, this is a big concern. I have much on my plate for this month though, but surely making this repo stable would be awesome! Let me know what I can help you with, I'll try to find some time next month and do it. Also, keytar was a big no-no for when installing this repo but ended up using it because of a shortage of time. So that's what we should fix first.
Sounds great. Hopefully I should have some time next month too. If I start a new branch I'll tag you on a draft PR or something.
This was just released to NPM as version 1.4.0 😄 https://www.npmjs.com/package/electron-auth0-login
There are scenarios where we have to send custom params to the auth0 authorization page, an example includes the "connection_scope", so this PR created to make use of such params. @jbreckmckye