There are tons of different approaches to user authentication. Passwordless or “magic link” authentication is very user friendly, relatively easy to implement and sufficiently secure for most apps. This article is a step by step guide for implementing passwordless authentication in Phoenix. TL;DR This guide assumes you are familiar with the basic flow, which you might have experienced in Slack or
There are a few good examples showing how to use OAuth authentication in Phoenix and Elixir, but I wanted a solution which used a small amount of dependencies, and had the ability to make authenticated requests on behalf of a user. parroty/extwitter provides the functionality to authenticate as a user, as well as to make requests on behalf of that user. I wanted to just use this library, and avoid
Phoenix で OAuth 認証をやってみます。 今回は GitHub の OAuth を使いますが、Twitter や Facebook といったものにもつかえると思います。 また、認証用ライブラリはコチラを利用します。実装はこちらに公開されているサンプルを追っていくカタチとなります。 Phoenix アプリケーションの作成についてはコチラをご参照ください。 下準備: GitHub アプリケーションを登録する まずは GitHub にアプリケーションを登録して、各種キーを手に入れます。 GitHub にログインした状態で登録ページに行き、フォームを埋めていきます。 今回はテスト用のアプリケーションなので、基本的には適当に埋めていけば良いのですが、callback URL だけ以下のように設定します。 http://localhost:4000/auth/callback Regist
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く