アプリの認可解除

数年、開発から離れるとトレンドもすっかり変わって追いかけるのすごい大変。

ユーザが退会したら

SNSへの認可もAPIで取り消したいのが人情。
テストのべき等性も考えると不可避な事案でございますね。

とりあえずメジャーな twitter, facebook, google の解除APIを調べたのでリンクなどを残します。


twitter

.... と思ったら違う。
わからん。無いのか??教えてえろい人。
幸先悪い。

facebook


google

Using OAuth 2.0 for Web Server Applications - Google Accounts — Google Developers

Revoking a token

In some cases a user may wish to revoke access given to an application. A user can revoke access by visiting the following URL and explicitly revoking access: https://accounts.google.com/b/0/IssuedAuthSubTokens. It is also possible for an application to programmatically revoke the access given to it. Programmatic revocation is important in instances where a user unsubscribes or removes an application. In other words, part of the removal process can include an API request to ensure the permissions granted to the application are removed.

To programmatically revoke a token, your application makes a request to https://accounts.google.com/o/oauth2/revoke and includes the token as a parameter:

curl https://accounts.google.com/o/oauth2/revoke?token={token}


twitter は 3〜4のウェブサービス側から連携解除したり、ウェブサービス自体から退会しても、認可情報が残ってる。

... ってか他のSNSも、残ってるの多いな。

あんまり気にしなくてよいのか??

いや、ひょっとしたら非同期という線もありうる。
もうしばらく寝かしてみよう。
http://blog-imgs-43.fc2.com/a/b/s/absolutezero0808/216238_212856755409816_5467250_n.jpg