chigreen

Joined

1,780 Experience
17 Lessons Completed
0 Questions Solved

Activity

Posted in Strava API auth please HELP

I am attempting to create a very simple rails API app. I need to be able to authenticate within my application in order to access my data. authentication is a four-part process, I have done this successfully with Postman but now I need to do this within my application. the doc's on strava https://developers.strava.com/docs/getting-started/#getsupport. I could use an example of how to walk through his process please let me know of any example apps or the best tutorial here on this site or somewhere else.

Thank you for any help
Issue : Rails Credentials
What am I attempting to do: Add Twitter Api_key & Api_key_secret key to my rails app using the rails credentials:edit --enviroment=developement command.
environment details: editor Atom
list of errors and attempts to resolve them:
ran: rails credentials:edit --enviroment=developement
traceback:`edit': wrong number of arguments (given 1, expected 0) (ArgumentError)
ran: EDITOR="atom --wait" rails credentials:edit
which: creates a ####.credentials.yml file, but the command line is now left hanging. I am not able to exit and save any edits to the file. Forcing me to control + c to make the command line usable again.
Thank you for your help

Posted in Testing API Integrations with WebMock Discussion

Thank you!

Hello Chris,
Thanks for this tutorial! when pushing the connect to Twitter button, I receive this error
OAuth::Unauthorized
400 Bad Request
Extracted source (around line #254):

self.token_request(http_method, uri.path, token, request_options, arguments)
when (400..499)
raise OAuth::Unauthorized, response
else
response.error!
end
I adjusted to using a post method in the views/main/index file
to match the new requirements for omniauth.
'<%=button_to "Connect Twitter", "/auth/twitter", method: :post, class: "btn btn-primary" %>

An error occurs when I run Rails C and then run Rails.application.credentials.twitter I receive nil as my response, but when run 'EDITOR="atom --wait" rails credentials: edit I can see the saved Twitter api_key

Thank you

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.