Securly Storing OpenID identifiers and OAuth tokens

前端 未结 5 576
囚心锁ツ
囚心锁ツ 2020-12-12 12:45

I am creating a web app that will use OpenID logins and OAuth tokens with Youtube. I am currently storing the OpenID identity and OAuth token/token secret in plain text in

5条回答
  •  半阙折子戏
    2020-12-12 13:12

    OpenID URL shouldn't be encrypted because this is your "open id" literally, everyone should know the value. Besides, the URL needs to be an index in the database and it's always problematic to encrypt the index in the database.

    OAuth token/secret should be secret and encryption may improve security if you have to store the token long term. In our OAuth consumer application, token/secret is only stored in session for a short while and we choose not to encrypt them. I think that's secure enough. If someone can peek into our session storage, they probably have our encryption key also.

提交回复
热议问题