Class: KindleNotebook::AmazonAuth
- Inherits:
-
Object
- Object
- KindleNotebook::AmazonAuth
- Defined in:
- lib/kindle_notebook/amazon_auth.rb
Instance Method Summary collapse
-
#initialize(email:, password:) ⇒ AmazonAuth
constructor
A new instance of AmazonAuth.
- #sign_in ⇒ Object
Constructor Details
#initialize(email:, password:) ⇒ AmazonAuth
Returns a new instance of AmazonAuth.
5 6 7 8 |
# File 'lib/kindle_notebook/amazon_auth.rb', line 5 def initialize(email:, password:) @email = email @password = password end |
Instance Method Details
#sign_in ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/kindle_notebook/amazon_auth.rb', line 10 def sign_in session.visit(KindleNotebook.configuration.url) if puts "Session restored!" return session end submit_sign_in_form submit_otp_form if mfa? session. puts "You're signed in!" end |