DEV Community

MUSTDOS
MUSTDOS

Posted on

Ruby on Rails 8 API not allowing mobile phone connection

My ruby on rails 8 API works with postman, but I get 401 unauthorized access when trying to connect through android studio avd. I tried to stick to this link https://husseinelgammal.hashnode.dev/implementing-an-authentication-in-a-ruby-on-rails-api-only-project-using-devise-and-jwt#heading-enabling-cors as much as possible and modified config/devise.rb with config.authentication_keys = [:name]

MainActivity.kt


var baseURL = "http://10.0.2.2:3000/"
var connectURL =

Top comments (0)

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay