Skip to content

[fetch] Integrating devise-token-auth with react-native using fetch ? #1523

@piyushchauhan2011

Description

@piyushchauhan2011

I want to integrate devise-token-auth with react-native.

fetch('http://localhost:3000/auth', {
      method: 'post',
      body: JSON.stringify({
        config_name: 'default',
        first_name: this.state.first_name,
        last_name: this.state.last_name,
        email: this.state.email,
        password: this.state.password,
        password_confirmation: this.state.password_confirmation,
      })
    })

Unable to post the json in correct format, am I doing something wrong ?

There is very less documentation on fetch api

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions