reactjs


auth0 - invalid user_metadata type


I am using Auth0 for user management and I am trying to add some default user_metadata on signup. My signup code looks like this:
// signs a user up
signup(email, password, callback, metadata){
const defaultVals = {
app_complete: false,
app_decision: 'unknown',
app_term: this.getAppTerm(),
nickname: '',
middle_initial: '',
current_age: '10',
}
const meta = Object.assign({}, defaultVals, metadata);
console.log(meta);
this.auth0.redirect.signupAndLogin({
connection: 'Username-Password-Authentication',
email,
password,
user_metadata: meta,
}, function(err, authResult) {
if (err != undefined) {
callback(err);
console.log(err);
return;
}
});}
The problem is, whenever I try to pass the user_metadata attribute app_complete: false, the API returns an error saying that the data type false is invalid, and that only strings are allowed. Error message: invalid user_metadata.app_complete type (only strings are allowed).
I know JSON allows for types other than strings, because I can change this to false through the Auth0 user dashboard. Why is the signup method for the auth0 WebAuth object returning this error?
Thanks.

Related Links

ComponentDidMount() not working
UIScrollView Canvas Equivalent?
ReactJS - props or propTypes?
React Router V4 structure
Should a view be ordering data?
Unable to load React class component inside other class component
How to get history on react-router v4?
Redux react immutable setIn element changes whole list
react: fade-in/slide-in animation when render component
ReactJS component vendors
css-loader, sass-loader not working webpack 2
The best way to organize your site ready for both PC and SP in reactjs, responsive or 2 sources?
Check data has already been fetched for react-redux in action, reducer or component?
<element>.innerText in component method code does not work properly in enzyme testing. Testing react component with Jest+Enzyme(mount())
React Webpack in Production Error #105
Is there a neater way to connect an input field to a state property in React than onChange?

Categories

HOME
javafx
url
cluster-analysis
liquibase
jquery-plugins
thermal-printer
msbi
checkpoint
google-api-oauth
obd-ii
box-api
software-collections
wkhtmltopdf
ethereum
theory
activejdbc
urllib2
decoding
resharper
tracking
logstash-configuration
tag-cloud
simd
geography
draw2d
aiml
fastboot
onclicklistener
oracle-golden-gate
pumping-lemma
oracle10g
2checkout
blockly
mplab
visual-studio-debugging
directions
visual-prolog
respect-validation
dotnetnuke-module
stdin
armadillo
blueimp
rbac
ape-phylo
java-5
colorbox
peerjs
head
cakephp-3.2
hierarchical-clustering
runner
easyquery
confluent
emacs24
standard-error
node-java
nservicebus6
androiddesignsupport
cc
wicketstuff
catalyst
fileopendialog
alarmmanager
blackberry-webworks
csc
supervised-learning
containstable
jersey-test-framework
bluetooth-lowenergy-4.2
newlib
android-filterable
pagecontrol
playn
vspackage
jad
fxmlloader
ccmenuitem
rpt
xpand
cs193p
rssi
dayofweek
cvi
acrofields
mysql-error-1146
grunt-wiredep
dylan
nokogiri
string-length
dnsbl
feincms
linear-interpolation
php-gettext
maven-eclipse-plugin
scriptmanager
isgl3d
sessiontracking
s60
table-valued-parameters
silverlight-2.0

Resources

Encrypt Message