doug_w
05/12/2017, 7:03 PMhttp://localhost:3000 to the list of CB urls, but sometimes I get this error, which I tried adding, and didn’t helpnilan
05/12/2017, 7:04 PMnilan
05/12/2017, 7:04 PMthis.props.router.replace('/') lines and put a debugger statement there instead?doug_w
05/12/2017, 7:04 PMnilan
05/12/2017, 7:05 PMconsole.log the responsedoug_w
05/12/2017, 7:08 PMCreateUser componentdoug_w
05/12/2017, 7:08 PMdoug_w
05/12/2017, 7:10 PMdoug_w
05/12/2017, 7:10 PMcreateUser = () => {
const variables = {
idToken: window.localStorage.getItem('auth0IdToken'),
emailAddress: this.state.emailAddress,
name: this.state.name,
emailSubscription: this.state.emailSubscription,
}
this.props.createUser({ variables })
.then((response) => {
console.log('SUCCESS RESPONSE', response)
}).catch((e) => {
console.log('ERROR RESPONSE', e)
})
}
Don’t get anything in the consoledoug_w
05/12/2017, 7:12 PMhttp://localhost:3000/signup is not in the list of allowed callback URLsnilan
05/12/2017, 7:23 PMdoug_w
05/12/2017, 7:26 PMnilan
05/12/2017, 7:27 PMcreateUser mutation yourself in the playground and see what it returns?nilan
05/12/2017, 7:28 PMdoug_w
05/12/2017, 7:29 PMthis._lock = new Auth0Lock(props.clientId, props.domain)nilan
05/12/2017, 7:29 PMnilan
05/12/2017, 7:30 PMauthenticated event of the lockdoug_w
05/12/2017, 7:30 PMdoug_w
05/12/2017, 7:41 PMmutation b {
createUser(
name: "Doug W",
emailAddress: "d@d.com",
auth0token: "token..etc",
emailSubscription: false) {
id
}
}doug_w
05/12/2017, 7:42 PM"Unknown argument 'auth0token' on field 'createUser' of type 'Mutation'. Did you mean 'authProviderdoug_w
05/12/2017, 7:42 PMauthProvider as the key and I get
"Argument 'authProvider' expected type 'AuthProviderSignupData!'nilan
05/12/2017, 7:43 PMcreateUser mutation has to look like 🙂nilan
05/12/2017, 7:43 PMauthProvider is an object input argumentnilan
05/12/2017, 7:44 PMmutation b {
createUser(
name: "Doug W",
emailAddress: "d@d.com",
authProvider: { auth0: { idToken: "token..etc"} }
emailSubscription: false) {
id
}
}doug_w
05/12/2017, 7:45 PMnilan
05/12/2017, 7:45 PMnilan
05/12/2017, 7:46 PMcreateUser mutationdoug_w
05/12/2017, 7:46 PMnilan
05/12/2017, 7:47 PMdoug_w
05/12/2017, 7:52 PMdoug_w
05/12/2017, 7:52 PMYou likely forgot to export your component from the file it's defined in. Check your code at NewPostLink.js:8.nilan
05/12/2017, 7:52 PMdoug_w
05/12/2017, 7:53 PMnilan
05/12/2017, 7:53 PMdoug_w
05/12/2017, 7:53 PMnilan
05/12/2017, 7:54 PMdoug_w
05/12/2017, 7:54 PMnilan
05/12/2017, 7:55 PMimport { Link } from 'react-router-dom' in the NewPostLink file instead?nilan
05/12/2017, 7:55 PMdoug_w
05/12/2017, 7:56 PMnilan
05/12/2017, 7:56 PMdoug_w
05/12/2017, 7:56 PMnilan
05/12/2017, 7:56 PMnilan
05/12/2017, 7:56 PMnilan
05/12/2017, 7:56 PMnilan
05/12/2017, 7:57 PMdoug_w
05/12/2017, 7:57 PMdoug_w
05/12/2017, 7:57 PMnilan
05/12/2017, 7:58 PMdoug_w
05/12/2017, 7:58 PMnilan
05/12/2017, 7:58 PMdoug_w
05/12/2017, 7:59 PMnilan
05/12/2017, 7:59 PMdoug_w
05/12/2017, 9:38 PMCreatePost and CreateUser still have import { withRouter } from 'react-router' Which I tried changing them to import { withRouter } from 'react-router-dom' and it didn’t seem to help.
Even when it did appear to be working by routing me to the logged in view - I never did get a new User data created in my Graph.cool DB. Is there any need for react-router at all? I tried deleting it as a dependency and removing it everywhere but that didn’t seem to fix either.doug_w
05/12/2017, 9:40 PMcreateUser = () => {
alert('about to create user')
const variables = {
idToken: window.localStorage.getItem('auth0IdToken'),
emailAddress: this.state.emailAddress,
name: this.state.name,
emailSubscription: this.state.emailSubscription,
}nilan
05/13/2017, 11:02 AMnilan
05/13/2017, 11:03 AMnilan
05/13/2017, 11:03 AM