Exception: StandardId::SocialLinkError
- Inherits:
-
OAuthError
- Object
- StandardError
- OAuthError
- StandardId::SocialLinkError
- Defined in:
- lib/standard_id/errors.rb
Overview
Social login errors NOTE: email and provider_name are exposed as reader attributes for host apps to build custom error responses. If you report exceptions to an error tracker (Sentry, etc.), be aware these attributes contain PII.
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#provider_name ⇒ Object
readonly
Returns the value of attribute provider_name.
Instance Method Summary collapse
- #http_status ⇒ Object
-
#initialize(email:, provider_name:) ⇒ SocialLinkError
constructor
A new instance of SocialLinkError.
-
#oauth_error_code ⇒ Object
Uses standard OAuth :access_denied code since account_link_required is non-standard.
Constructor Details
#initialize(email:, provider_name:) ⇒ SocialLinkError
Returns a new instance of SocialLinkError.
135 136 137 138 139 |
# File 'lib/standard_id/errors.rb', line 135 def initialize(email:, provider_name:) @email = email @provider_name = provider_name super("This email is already associated with an account. Please sign in first to link this provider.") end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
133 134 135 |
# File 'lib/standard_id/errors.rb', line 133 def email @email end |
#provider_name ⇒ Object (readonly)
Returns the value of attribute provider_name.
133 134 135 |
# File 'lib/standard_id/errors.rb', line 133 def provider_name @provider_name end |
Instance Method Details
#http_status ⇒ Object
143 |
# File 'lib/standard_id/errors.rb', line 143 def http_status = :forbidden |
#oauth_error_code ⇒ Object
Uses standard OAuth :access_denied code since account_link_required is non-standard
142 |
# File 'lib/standard_id/errors.rb', line 142 def oauth_error_code = :access_denied |