tprzytula / meteor-remember-me Goto Github PK
View Code? Open in Web Editor NEWMeteor accounts extension with remember me functionality
License: MIT License
Meteor accounts extension with remember me functionality
License: MIT License
It's rather normal behavior for a user to hit to refresh the page if something seems wrong with the app. This is something they can do without issues in regular Meteor without RememberMe functionality or with this package and rememberMe set to true. However, if they log in with rememberMe set to false, they lose the ability to reload the page and remain logged in. Instead, the session becomes lost and they must log in again.
How can we alter this behavior so that only logging out or closing the tab altogether ends the session, and not a simple reload?
Constraint conflict with newly released accounts-base 2.0.0:
C:\myApp>meteor add tprzytula:remember-me
=> Errors while adding packages:
While selecting package versions:
error: Conflict: Constraint [email protected] is not satisfied by accounts-base 2.0.0.
Constraints on package "accounts-base":
* [email protected] <- top level
* accounts-base@~2.0.0 <- top level
* [email protected] <- service-configuration 1.1.0 <- accounts-base 2.0.0
* [email protected] <- accounts-password 2.0.0
* [email protected] <- tprzytula:remember-me 0.1.0
I'll try modifying the constraint:
[email protected] || 2.0.0
and see if it still works.
I am using the RememberMe component in my Signin form (a React functional component in Meteor)
When I try running tests with Jest I get the following error:
Cannot find module 'meteor/tprzytula:remember-me' from 'imports/ui/components/signin/SigninForm.js'
Require stack:
imports/ui/components/signin/SigninForm.js
tests/Signin.test.js
2 | import React, {useState, useRef} from 'react';
3 | import {Accounts} from 'meteor/accounts-base';
> 4 | import RememberMe from 'meteor/tprzytula:remember-me';
| ^
Here is my test code using Jest and Enzyme
const wrapper = mount(<Signin t={() => {}} /> );
Is there a solution/workaround for this problem?
3.0.3
to 3.0.4
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 5 commits.
8ac4325
version bump
9d9c227
Bump extend from 3.0.1 to 3.0.2 (#226)
33119a7
Bump js-yaml from 3.11.0 to 3.13.1 (#225)
f5549c7
Bump handlebars from 4.1.0 to 4.1.2 (#224)
4df732b
Style fix (#211)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
this
doesn't automatically bind if you upgrade to the latest Meteor version:
https://github.com/tprzytula/Meteor-Remember-Me/blob/master/client/index.js#L34
Should likely rewrite these as arrow functions:
getLoginWithPasswordMethod = () => {
Further down the code fails here: https://github.com/tprzytula/Meteor-Remember-Me/blob/master/client/index.js#L64
Complaining that this.getLoginWithPasswordMethod
is non-existent.
Branch | Build failing π¨ |
---|---|
Monorepo release group | babel7 |
Current Version | 7.0.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
This monorepo update includes releases of one or more dependencies which all belong to the babel7 group definition.
babel7 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
2.17.2
to 2.17.3
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
eslint-plugin-import is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 25 commits.
cf5573b
Bump to v2.17.3
caae65c
[Tests] eslint 2 does not have linter.version
557a3e2
[Deps] update resolve
17beb33
Merge pull request #1356 from christophercurrie/typescript-declare
c8ac7ff
[Docs] Document env
option for eslint-import-resolver-webpack
c09c0ce
Issue #1258 (docs)
753c9db
[refactor] fix eslint 6 compat by fixing imports
b52bf3e
PR feedback
7aa13d1
PR feedback
f66e064
Remove log messages
d1e4455
Verbose variable names
67b1e95
Support older typescript parsers
288cedf
Make groups non-capturing.
aa290bb
Improve support for Typescript declare structures
1edbbd0
[Fix] no-common-js
: Also throw an error when assigning
There are 25 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
2.44.0
to 2.44.1
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
chromedriver is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 1 commits.
860ea55
Fix bug when working with file cache
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Hi,
I've tried this package for making sure the user session has been logged out when the tab is closed. The package seems to go one step further and logout the user even when the page is refreshed - which is ok for the most part. However, when I try to open a new tab with a certain url using window.open('some_custom_url_within_the_app', '_blank')
OR window.open('some_custom_url_within_the_app', '_self')
- it forces the user to be logged out - which doesn't seem to be nice.
What can be a workaround for this behaviour? Can there be a disable logout on page refresh as an option?
Thanks.
2.18.0
to 2.18.1
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
eslint-plugin-import is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 14 commits.
b51aa2f
Bump to v2.18.1
32704da
fix: Improve parse perf when using @typescript-eslint/parser
3b21de6
[Tests] extract common "get parser" logic into test helpers
f4e3f1b
prefer-default-export: don't warn on TypeAlias & TSTypeAliasDeclaration
1caa402
[Fix] no-unused-modules
: Exclude package "main"/"bin"/"browser" entry points
22d5440
[fix] export
: false positive for typescript overloads
5abd5ed
[Tests] temporarily disable these failing tests in eslint < 4
752dcd5
[Tests] add missing --no-save
to time travel script
d3a3fa5
[Refactor] no-extraneous-dependencies
: remove the last bit of lodash
8a38fd4
[Refactor] no-extraneous-dependencies
: use Array.isArray
instead of lodash
c5078ad
[Refactor] importType
: remove use of cond
118afd4
no-deprecated: don't run tests for typescript-eslint-parser against ESLint <4
6512110
fix tests for node 4 + fixed lint issues
bb9ba24
no-deprecated TS tests (#1315)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
devDependency
@babel/runtime was updated from 7.4.3
to 7.4.4
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
This monorepo update includes releases of one or more dependencies which all belong to the babel7 group definition.
babel7 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
7.3.2
to 7.4.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
devDependency
@babel/runtime was updated from 7.1.5
to 7.2.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
This monorepo update includes releases of one or more dependencies which all belong to the babel7 group definition.
babel7 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
I came across this wonderful package but had issues using it following the README
Instead, I got it working by doing this
import { factory as RememberMe } from 'meteor/tprzytula:remember-me';
rememberMeObj.loginWithPassword(email, password, (err) => {
if (err) {
console.error(err);
} else {
}
});
}, rememberMe);
If this is the case, it would be best to update the readme as such.
Leaving this here should in case someone faces similar issue using this package.
I get the following when I try to resume a session (i.e. when returning to the site after passing true
to loginWithPassword
). Initial login is fine and behaves as normal, but on returning to the site, I need to log in again. Any ideas?
Exception while invoking method 'login' Error: shouldn't happen (validation missed something)
at AccountsServer.Accounts._findUserByQuery (packages/accounts-password/password_server.js:135:13)
at AccountsServer.Accounts.findUserByUsername (packages/accounts-password/password_server.js:165:19)
at Module.findUserByUsername (packages/tprzytula:remember-me/server/integration/accounts.js:22:56)
at ShouldResumeBeAccepted._getUsersLoginTokens (packages/tprzytula:remember-me/server/loginAttemptValidator/validators/shouldResumeBeAccepted.js:80:42)
at ShouldResumeBeAccepted._getResume (packages/tprzytula:remember-me/server/loginAttemptValidator/validators/shouldResumeBeAccepted.js:57:34)
at ShouldResumeBeAccepted.validate (packages/tprzytula:remember-me/server/loginAttemptValidator/validators/shouldResumeBeAccepted.js:35:33)
at failedValidator._validators.find.validator (packages/tprzytula:remember-me/server/loginAttemptValidator/index.js:32:79)
at Array.find (native)
at LoginAttemptValidator.validate (packages/tprzytula:remember-me/server/loginAttemptValidator/index.js:32:50)
at RememberMe._validateAttempt (packages/tprzytula:remember-me/server/index.js:62:64)
at packages/callback-hook/hook.js:130:22
at _validateLoginHook.each.callback (packages/accounts-base/accounts_server.js:154:15)
at Hook.each (packages/callback-hook/hook.js:108:15)
at AccountsServer._validateLogin (packages/accounts-base/accounts_server.js:151:29)
at AccountsServer._attemptLogin (packages/accounts-base/accounts_server.js:338:10)
at MethodInvocation.methods.login (packages/accounts-base/accounts_server.js:520:23)
at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1767:12)
at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46)
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
at Promise (packages/ddp-server/livedata_server.js:715:46)
at new Promise (<anonymous>)
at Session.method (packages/ddp-server/livedata_server.js:689:23)
at packages/ddp-server/livedata_server.js:559:43
Hello,
I think it would be a better practice to change argument type "username" from String
to String or Object, because it is as such in Meteor.loginWithPassword( username || email [Type: String or Object], password, callback)
.
Because, some websites do not have username implementation and logs in only with email. So when you use (email, password) => Meteor.loginWithPassword({email: email}, password, [callback])
it works.
IMHO you should also implement this argument type to your RememberMe class.
Nice add-on, keep up the good work!
10.0.1
to 10.0.2
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
babel-eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
Fixes #772
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.