Skip to content

Commit

Permalink
bump go modules,switch from local email client to go-pkgz/email
Browse files Browse the repository at this point in the history
The local client started lagging behind go-pkgz/email feature-wise.
  • Loading branch information
paskal authored and umputun committed Oct 3, 2022
1 parent d4e68dd commit a95f9ed
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 275 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,26 @@ The API for this provider:

The provider acts like any other, i.e. will be registered as `/auth/email/login`.

### Email

For email notify provider, please use `github.com/go-pkgz/auth/provider/sender` package:
```go
sndr := sender.NewEmailClient(sender.EmailParams{
Host: "email.hostname",
Port: 567,
SMTPUserName: "username",
SMTPPassword: "pass",
StartTLS: true,
From: "[email protected]",
Subject: "subject",
ContentType: "text/html",
Charset: "UTF-8",
}, log.Default())
authenticator.AddVerifProvider("email", "template goes here", sndr)
```

See [that documentation](https://github.com/go-pkgz/email#options) for full options list.

### Telegram

Telegram provider allows your users to log in with Telegram account. First, you will need to create your bot.
Expand Down
24 changes: 13 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ go 1.17

require (
github.com/dghubble/oauth1 v0.7.1
github.com/go-oauth2/oauth2/v4 v4.4.3
github.com/go-oauth2/oauth2/v4 v4.5.1
github.com/go-pkgz/email v0.4.0
github.com/go-pkgz/repeater v1.1.3
github.com/go-pkgz/rest v1.14.0
github.com/go-pkgz/rest v1.16.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/microcosm-cc/bluemonday v1.0.19
github.com/microcosm-cc/bluemonday v1.0.20
github.com/nullrocks/identicon v0.0.0-20180626043057-7875f45b0022
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.8.0
go.etcd.io/bbolt v1.3.6
go.mongodb.org/mongo-driver v1.8.5
go.mongodb.org/mongo-driver v1.10.2
golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
)
Expand All @@ -21,12 +22,13 @@ require (
cloud.google.com/go/compute v1.6.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/klauspost/compress v1.15.2 // indirect
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/tidwall/btree v0.0.0-20191029221954-400434d76274 // indirect
Expand All @@ -41,12 +43,12 @@ require (
github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit a95f9ed

Please sign in to comment.