Open rakesh-agrawal opened 6 years ago
Any pointers?
Just confirm, are you able to see your logo in signup and login widget, but can't see it in the email verification widget?
Yes...
I think it's because the package is using the default option to handle Auth0 error. Details in https://github.com/xcv58/meteor-auth0/blob/c542930e635ee6fe53f9602345f829ad8527ceef/auth0-lock/auth0-lock-client.js#L9
Could you please add logs right after your initLock
statements to confirm this?
The workflow should be:
this.signupWithAuth0
to sign upLock
object to handle auto sign in (auth0 URL from step 2), and find the user email is not verified then popup error widget (without your logo).Could you please confirm whether my guess is correct and we can discuss solution/workaround for this?
I guess you are absolutely right. In case of error, lock is displayed with default options.
Can you try to call initLock
in Meteor.startup()
with your config?
I know it may not work because of the race condition. But it worths a try.
The long-term solution should be not initLock
in the package itself and ask the developer to init their own lock object. But it's a breaking change and may need test and warning if developer forgets to init lock.
Ok, We will try to put initlock in startUp. Could you please elaborate what race conditions you are referring.
For the long term solution, I guess it will require changes in the package itself right??
Thanks for helping us!!
The race condition is that the default Lock may handle the error before the Lock you init in Meteor.startup()
.
Yes, the long-term solution requires some changes in the package and will break existing code for someone. But it's just my initial idea, I haven't think about it carefully.
Thank you for reporting the bug and using the package!
Hi,
We have tried putting the lock init in Meteor.startUp(). It works but we are getting another issue 'STATE' DOES NOT MATCH
thanks
Could you explain more about 'STATE' DOES NOT MATCH?
This is the error I see on the Auth0 Lock widget and we get this only when we put lock init in Meteor.startUp()
This should be the race condition I mentioned. I'm trying to fix it.
Thanks!! We are few days away from our beta release...This fix would help us. Thank You!!
Related to https://github.com/auth0/lock/issues/907
ok.. Will it take time to fix?
I publish 8.0.0 https://atmospherejs.com/xcv58/auth0-lock with breaking change:
import { Meteor } from 'meteor/meteor';
import { initLock } from 'meteor/xcv58:auth0-lock';
Meteor.startup(function () {
// This is required to handle login
const Lock = initLock();
Lock.show();
})
Could you have a try?
Ok, So upgrading the package should solve this issue. Will upgrade and let you know.. thanks
Thanks.
Hi,
I tried upgrading the package. But after upgrade my server is not starting.
Below is the error I am getting: C:\Users\rakesh_agrawal\AppData\Local.meteor\packages\tap_i18n\1.8.2\plugin.tap-i18n-compiler.os\npm\node_modules\meteor\promise\node_modules\meteor-promise\promise_server.js:116 throw error; ^
TypeError: Path must be a string. Received undefined
at assertPath (path.js:28:11)
at relative (path.js:1262:5)
at ImportScanner.getRelativeImportId (C:\tools\isobuild\import-scanner.js:662:24)
at each (C:\tools\isobuild\import-scanner.js:632:33)
at .each._.forEach (C:\Users\rakesh_agrawal\AppData\Local.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner.resolve (C:\tools\isobuild\import-scanner.js:621:7)
at each (C:\tools\isobuild\import-scanner.js:728:29)
at .each._.forEach (C:\Users\rakesh_agrawal\AppData\Local.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner.scanFile (C:\tools\isobuild\import-scanner.js:719:5)
at each (C:\tools\isobuild\import-scanner.js:812:12)
at .each._.forEach (C:\Users\rakesh_agrawal\AppData\Local.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner.scanFile (C:\tools\isobuild\import-scanner.js:719:5)
at each (C:\tools\isobuild\import-scanner.js:812:12)
at .each._.forEach (C:\Users\rakesh_agrawal\AppData\Local.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner.scanFile (C:\tools\isobuild\import-scanner.js:719:5)
at each (C:\tools\isobuild\import-scanner.js:812:12)
at .each._.forEach (C:\Users\rakesh_agrawal\AppData\Local.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner.scanFile (C:\tools\isobuild\import-scanner.js:719:5)
at each (C:\tools\isobuild\import-scanner.js:812:12)
at .each._.forEach (C:\Users\rakesh_agrawal\AppData\Local.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner.scanFile (C:\tools\isobuild\import-scanner.js:719:5)
at each (C:\tools\isobuild\import-scanner.js:812:12)
at .each._.forEach (C:\Users\rakesh_agrawal\AppData\Local.meteor\packages\meteor-tool\1.6.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner._scanFile (C:\tools\isobuild\import-scanner.js:719:5)
at outputFiles.forEach.file (C:\tools\isobuild\import-scanner.js:414:14)
at Array.forEach (
Any pointers? My meteor is already at the latest version 1.6.1
Delete .meteor/local
and try again. The local DB will be deleted as well.
Already tried this.. No success..
Thanks Rakesh
From: Yihong notifications@github.com Sent: Sunday, March 11, 2018 6:53:01 PM To: xcv58/meteor-auth0 Cc: Rakesh Agrawal; Author Subject: Re: [xcv58/meteor-auth0] login after signup does not show the configured widget (#11)
Delete .meteor/local and try again. The local DB will be deleted as well.
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
Removing 8.0.0 and installing 7.1.1 version works fine..
I can't reproduce the bug. I did try on different machines.
Could you try to first remove the package, clean up everything not tracked by git under .meteor
, then add the latest package again?
The change for 8.0.0 should not lead to this bug: d40c15eb3a0b38f5539b12b63db4f747fef9ef8d
Sure, I will try..
Thanks Rakesh
From: Yihong notifications@github.com Sent: Sunday, March 11, 2018 9:35:50 PM To: xcv58/meteor-auth0 Cc: Rakesh Agrawal; Author Subject: Re: [xcv58/meteor-auth0] login after signup does not show the configured widget (#11)
I can't reproduce the bug. I did try on different machines.
Could you try to first remove the package, clean up everything not tracked by git under .meteor, then add the latest package again?
The change for 8.0.0 should not lead to this bug: d40c15ehttps://github.com/xcv58/meteor-auth0/commit/d40c15eb3a0b38f5539b12b63db4f747fef9ef8d
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
I tried everything, even on a fresh centos machine but it did not work. Do you have an indirect dependency on tap_i18n package?
/home/centos/.meteor/packages/tap_i18n/.1.8.2.pg5k92.3iou++os+web.browser+web.cordova/plugin.tap-i18n-compiler.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:116 throw error; ^
TypeError: Path must be a string. Received undefined at assertPath (path.js:28:11)
Since I can't reproduce your bug. There is a workaround is you copy the entire fold auth0-lock
to your code base, then link it under the packages
folder like I did in the example:
https://github.com/xcv58/meteor-auth0/tree/master/examples/sample-app/packages
You can try whether it reproduce the same bug.
Could you also try the sample-app by run meteor --settings production.settings.json
to see whether you can reproduce the bug?
Hi,
Thanks for the suggestions...
The sample-app you provided worked.
I am trying to replicate the same in my project.
I am not an expert on meteor but I tried the following:
1. Copied auth0-lock folder inside our project code base
2. Created a packages folder inside our project code base.
3. Created xcv58_auth0-lock folder inside the packages folder
4. Created a symlink to the auth0-lock folder
cd packages/
ls -ltr
total 0
drwxrwxr-x. 3 centos centos 18 Mar 12 07:00 xcv58_auth0-lock
lrwxrwxrwx. 1 centos centos 13 Mar 12 10:01 xcv58:auth0-lock -> ../auth0-lock
5. Updated packages file under .meteor with xcv58:auth0-lock
6. After that ran meteor -s settings.json
7. I got the error asking to install auth0-lock and auth0 packages
8. I ran meteor npm install --save auth0-lock auth0
9. Now i am getting below error:
W20180312-15:51:10.564(0)? (STDERR) Error: Cannot find module 'auth0-lock'
W20180312-15:51:10.564(0)? (STDERR) at Function.Module._resolveFilename (module.js:538:15)
W20180312-15:51:10.564(0)? (STDERR) at Function.resolve (internal/module.js:18:19)
W20180312-15:51:10.564(0)? (STDERR) at Object.require (/home/centos/actifiozero/a0-ui-api/.meteor/local/build/programs/server/boot.js:288:32)
W20180312-15:51:10.565(0)? (STDERR) at makeInstallerOptions.fallback (packages/modules-runtime.js:651:18)
W20180312-15:51:10.565(0)? (STDERR) at require (packages/modules-runtime.js:244:16)
W20180312-15:51:10.565(0)? (STDERR) at auth0-lock-client.js (auth0-lock/auth0-lock-client.js:1:228)
W20180312-15:51:10.565(0)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9)
W20180312-15:51:10.565(0)? (STDERR) at require (packages/modules-runtime.js:238:16)
W20180312-15:51:10.566(0)? (STDERR) at /home/centos/actifiozero/a0-ui-api/.meteor/local/build/programs/server/app/app.js:3770:1
Am i missing anything?
You can actually copy the auth0-lock
folder into your packages
and rename to xcv58:auth0-lock
.
So eventually your meteor has packages/xcv58:auth0-lock/
with the files in auth0-lock
.
Thanks it worked..
Hi,
We are using the package and having below configuration:
this.signupWithAuth0 = function() { auth0 = initLock({ closable: true,
autoclose: true, loginAfterSignUp: true }); auth0.show(); };
this.loginWithAuth0 = function() { auth0 = initLock({ closable: true, autoclose: true, theme: { logo: Meteor.settings.public.auth0Logo } }); auth0.show(); };
As per our configuration, application will try to login the user after signup. We have also put a rule so that user can login only after email verification.
So as soon as user signs up, our application shows a lock widget to login and gives a message that email verification is pending (as per the Auth0 rule we created). In this widget we do not see our configuration like company logo etc. We see the default lock widget from Auth0.
Where can we configure this? Is this widget is different from the login widget? Ideally it should be same right??
Thanks in Advance.