Simple authentication solution?

agolangf · · 492 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I am trying to build my first web app in go, after ditching NodeJS. With node, there are tons of frameworks and tutorials for passport, so it was quite easy to get it running, but I am having trouble doing the same thing in go.</p> <p>I need a basic email/password authentication system, and so far I&#39;ve found <a href="https://github.com/go-authboss/authboss" rel="nofollow">authboss</a>, but that seems dormant, and a few guidelines on how to build your own session system (I know I shouldn&#39;t roll my own though). The most promising library so far I think is <a href="https://github.com/markbates/goth" rel="nofollow">goth</a> which seems active and offers Auth0 support, which I think would be great for my needs.</p> <p>Do any of you have any experience with goth, are there any other simpler solutions? And also I like to learn instead of pasting code so a good walkthrough on how to use libraries are appreciated!</p> <hr/>**评论:**<br/><br/>lumost: <pre><p>Plus one for goth, these days most customers prefer some level of external authentication. In the SaaD world this mesns SAML, for everyone else its usually login with google/facebook.</p> <p>Auth0 gives you all that out of the box along with the nice to haves such as logging in as a customer etc. And goth makes it easy to use auth0.</p> <p>Also worth noting thar if you&#39;re looking to build a webapp in go it may be worth checking out <a href="http://gobuffalo.io/docs/getting-started" rel="nofollow">http://gobuffalo.io/docs/getting-started</a> which is ny the same author as goth.</p></pre>drakonka: <pre><p>I am looking into goth right now and to using it in conjunction with Auth0. However, I am very new to both (and to Go in general); the impression I get is that goth is not suitable to my specific needs because it is specific to <em>web</em> client authentication, whereas the current interface to my go app is CLI (and that is also how I have set up my Auth0 client). The first issue I already ran into is the fact that goth requires a &#34;callbackUrl&#34; when registering a new provider, which it seems Auth0 requires for web clients but not CLI clients.</p> <p>However, for web interfaces goth does come highly recommended. So what I am thinking is having authentication plugins for different interfaces - loading the web auth plugin which uses goth from the web interface (which I will later have), and writing my own Auth0 implementation for the cli interface. Not sure if this is at all a great solution yet, or if I&#39;ve missed something and could/should be using goth for both after all; I&#39;ll just have to experiment.</p> <p>Edit: typo</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

492 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传