You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to setup a new project with buffalo and github authentication I stumbled upon the following issue.
First of all, these are the steps I followed:
I set up a simple project as follows
$ buffalo new goth-auth
[...]
$ cd goth_auth/
$ buffalo db create --all
Then I tried to add github authentication using the goth-auth capability:
$ buffalo generate goth-auth github
INFO[0000] Find is deprecated, and will be removed in v0.12.0. Use generators.FindByBox instead. Called from /home/piffio/src/github.com/gobuffalo/buffalo-goth/auth/auth.go:14
create actions/auth.go
create actions/auth_test.go
run buffalo db generate model user name email:nulls.String provider provider_id
v4.1.0
create models/user.go
create models/user_test.go
run goimports -w actions/actions_test.go actions/app.go actions/auth.go actions/auth_test.go actions/home.go actions/home_test.go actions/render.go grifts/db.go grifts/init.go main.go models/models.go models/models_test.go models/user.go models/user_test.go
> migrations/20180311214330_create_users.up.fizz
> migrations/20180311214330_create_users.down.fizz
run go get github.com/markbates/goth/...
]$ buffalo dev
buffalo: 2018/03/11 22:44:02 === Rebuild on: :start: ===
buffalo: 2018/03/11 22:44:02 === Running: go build -v -i -o tmp/goth-auth-build (PID: 8650) ===
github.com/piffio/goth_auth/actions
# github.com/piffio/goth_auth/actions
actions/auth.go:46:10: cannot use "github.com/markbates/pop/nulls".NewString(gu.Email) (type "github.com/markbates/pop/nulls".String) as type "github.com/gobuffalo/pop/nulls".String in assignment
buffalo: 2018/03/11 22:44:02 === Error! ===
buffalo: 2018/03/11 22:44:02 === exit status 2
github.com/piffio/goth_auth/actions
# github.com/piffio/goth_auth/actions
actions/auth.go:46:10: cannot use "github.com/markbates/pop/nulls".NewString(gu.Email) (type "github.com/markbates/pop/nulls".String) as type "github.com/gobuffalo/pop/nulls".String in assignment
This is caused by the fact that buffalo and buffalo-goth are using different signatures for the pop package, as follows:
When trying to setup a new project with buffalo and github authentication I stumbled upon the following issue.
First of all, these are the steps I followed:
I set up a simple project as follows
Then I tried to add github authentication using the goth-auth capability:
This is caused by the fact that buffalo and buffalo-goth are using different signatures for the
pop
package, as follows:The issue seems to be in the file
auth/templates/actions/auth.go.tmpl
.I will be attaching a pull request after testing the fix
The text was updated successfully, but these errors were encountered: