tohu
23. Januar 2020 um 09:09
3
Es gibt eine React Native-App, die du als Referenz nutzen kannst, um herauszufinden, wie die Anmeldung funktioniert. Diese Datei hier sollte dir besonders beim Einstieg helfen.
'use strict';
import {Platform} from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';
const site = 'https://' + global.siteDomain;
class Authenticate {
constructor() {}
login(username, password) {
return new Promise((resolve, reject) => {
this.getAbout()
.then((json) => {
// old version
if (json.about.version.startsWith('2.5')) {
this.getCSRF()
.then((json) => {
if (json.csrf) {
AsyncStorage.getItem('@Discourse.loginCookie').then(
(cookie) => {
This file has been truncated. show original