auth0ロックをオフに作業をここに認証Reduxの例を反応させる:https://github.com/auth0-blog/redux-auth/tree/auth0-lockトラブルはReduxのでロックの例を反応させ、反応させ、ネイティブ
そしてのためにそれを使用して、ネイティブ反応し、私はとしてauth0ログイン画面を呼び出すためにしようとしています私のアクションのディスパッチの一部は、ネイティブのアプリケーションに反応してエラーが発生します。"Cannot have a non-function arg after a function arg"
アクションのディスパッチからauth0ロック関数を呼び出そうとしているときに、そのエラーの意味は何ですか?
// actions.js
function showLogin() {
return {
type: LOGIN_REQUEST,
};
}
function loginSuccess(profile, token) {
return {
type: LOGIN_SUCCESS,
profile,
token,
};
}
function loginError(err) {
return {
type: LOGIN_FAILURE,
err,
};
}
export function login() {
return (dispatch) => {
dispatch(showLogin());
// it seems to error on the next line here calling the auth0 login method
lock.show((err, profile, token) => {
if (err) {
// handle error
return dispatch(loginError(err));
}
return dispatch(loginSuccess(profile, token));
});
};
}
はい、それです! auth0のコードを使用していましたが、少し異なるロック機能を持つサンプルコードとauth0のネイティブロックバージョンが反応していました。問題とその答えをより正確に反映するために質問のタイトルを更新しました。 – MonkeyBonkey