Closed OvermindDL1 closed 7 years ago
And testing a registration reveals this error:
exited in: :gen_server.call(:hackney_manager, {:new_request, #PID<0.749.0>, #Reference<0.0.2.9235>, {:client, :undefined, {:metrics_ng, :metrics_dummy}, :hackney_ssl, 'api.sendgrid.com', 443, "api.sendgrid.com", [:with_body], nil, nil, nil, true, :hackney_pool, 5000, false, 5, false, 5, nil, nil, nil, :undefined, :start, nil, :normal, false, false, true, :undefined, false, nil, :waiting, nil, 4096, "", [], :undefined, nil, nil, nil, nil, :undefined, nil}}, :infinity) ** (EXIT) no process
have you tried the swoosh smtp
adapter?
Not a clue what swoosh even is. ^.^
The docs at https://hexdocs.pm/coherence/Coherence.html show no search results when search for swoosh
or Swoosh
, and searching mail
reveals only:
https://hexdocs.pm/coherence/Coherence.ControllerHelpers.html#send_user_email/3
https://hexdocs.pm/coherence/Coherence.Config.html#email_from/1
https://hexdocs.pm/coherence/Coherence.Config.html#email_reply_to/1
None of which also do not mention how to set it up. :-)
Also, how would I setup an OAuth system with Coherence, I am quite familiar with Ueberauth and since Ueberauth is just an integration layer for login systems (usernamepassword/google/facebook/twitter/github/genericOauth/etc...) and has utterly no graphical parts at all, I'm wondering if Coherence has a good integration point to where I can in-place setup users imported from other system. Have you looked at integration with Ueberauth or thought about using Ueberauth as the login handling part of Coherence, thus Coherence handles its 'identity' strategy (Literally make a Coherence.Ueberauth.Strategy.Identity or so to handle username/passwords) and then listen for responses from Ueberauth to handle login information. Right now that part of Coherence is tiny and as far as I can tell not extendable in any way, replacing that part with Ueberauth as the library would expand that to be entirely generic and extensible, and as such the rest of Coherence handles everything else, the front-end, password resets, etc... etc...? :-)
You can find info on Swoosh on hex.pm.
Coherence should work with other auth solutions. Just plug them instead of the Coherence auth plugs. Just need to make sure the put the authenticated user in conn.assigns and configure Coherence with the assigns key if it is not :current_user
@OvermindDL1 It's the first result. Their docs are very well kept:
https://hexdocs.pm/swoosh/Swoosh.html
Here is the SMTP adapter @smpallen99 referenced above:
You can find info on Swoosh on hex.pm.
Ah thought Swoosh was some internal thing, not a separate library, that should be documented in the docs. ^.^
Coherence should work with other auth solutions. Just plug them instead of the Coherence auth plugs. Just need to make sure the put the authenticated user in conn.assigns and configure Coherence with the assigns key if it is not :current_user
Ueberauth is not an auth solution like that, all it does is just take a route and verify if it is correct or not, whether via a custom identity strategy (which you need to write, coherence could fill that well), using google auth, whatever-else auth (ldap-auth in my case at work), and just hands it over to you to deal with (which is also where coherence would fit well). It does nothing for authorization, only authentication, it just authenticates that the person is who they say they are, but it says nothing about their capabilities, authorizations, anything else.
Right now Coherence is only capable of (as far as I can tell in the docs) username/password authentication (which would fit as an ueberauth strategy very well just to authenticate), but does not support any other method (I specifically need Google and LDAP auth, neither of which Coherence supports, we do not even have standard local username/password authentication, it either comes from google or is authenticated against the ldap server, regardless of how it comes it is all dropped into the same place from ueberauth, where I am currently just setting up a database-backed session and so forth, I'm doing all the coherence stuff manually, forgot password handling, etc... etc.. and it is a pain...).
Hence my mention of how Ueberauth would be a great library to include inside of Coherence, Ueberauth would supply it a fantastic username/password strategy, it already has other strategies for google, facebook, twitter, and like 20 others by default, it is easy to plug in custom strategies via just the config file (like with the LDAP server at work), then coherence could listen to successful or unsuccessful auths from Ueberauth and continuing doing everything it does now. Everything that Coherence currently does it will still keep doing, it would just stuff Ueberauth in-between the username/password login (where it would basically just pass-through your existing auth, it does not need to do much for simple identity auths), but it would also add the ability for other login strategies (that coherence would then either dynamically add to its user database, all backed by email or so, or just dynamically use as logins happen).
@OvermindDL1 It's the first result. Their docs are very well kept:
Indeed, looks useful, I'd just been using the erlang :gen_smtp
library thus far, did not know Swoosh was even a library, just though it was a Coherence adapter interface or so, it has absolutely no documentation at all in Coherence so I did not even know to even look for another library. ;-)
@OvermindDL1 Yeah, no worries. Swoosh is great. So is Bamboo: https://hexdocs.pm/bamboo/readme.html. Those seem to be among the more used mailers lately. At some point, I want to submit a PR to allow for swapping of mailers in Coherence.
that should be documented in the docs. ^.^
I sense a great first PR from you to this lib! I'm sure @smpallen99 would appreciate the help.
@OvermindDL1 Yeah, no worries. Swoosh is great. So is Bamboo: https://hexdocs.pm/bamboo/readme.html. Those seem to be among the more used mailers lately. At some point, I want to submit a PR to allow for swapping of mailers in Coherence.
Those look so much better and easier to use than the old :gen_smtp
's that I'm used to using over the past decade in Erlang. ^.^
Closing this issue as a dup of #8. @OvermindDL1 if your interested in documenting how to integrate uberauth with Coherence, go ahead an open an issue for that topic. As @scottt2 mentioned, I'd appreciate a PR on #8 👍
I'm not seeing a way of how to configure this application to use a local email server, it seems hard-coded to use something called 'swoosh' over an http connection, which is entirely non-standard...
With a stock install.