Comments (5)
I would like to work on this issue please
from sdk-for-web.
This is where the error occurs:
sdk-for-web/src/services/account.ts
Line 674 in 98d0c5a
Looks like href is read only in react native
from sdk-for-web.
I try but don't show login form of google. Please check. Thanks
from sdk-for-web.
React-native can't just open a web url. The Appwrite SDK was designed for web browsers, which make redirections, and for that reason certain parts like OAuth authentication won't work out of the box in react-native. There are a few ways around this though:
- As far as I know, the recommended way to do OAuth authentication in mobile is by triggering the phone's external browser to do the authentication and go back to your app with the token. There are libraries that do this such as "react-native-app-auth". but bear in mind that, as of today, it will require some configuration on your app, although you can find all the steps in their github page.
- You can roll out your own OAuth implementation by adding a WebView into your app and capturing the redirections. This is not recommended anymore though, due to potential security implications, and certain providers like Facebook have started to try to prevent developers from using this method (although at the moment can still be overridden)
- If you choose to go with option 2. I created long ago a react-native component that implements the OAuth flow over a WebView and should work with the latest Appwrite version as of December 2022. You can find it here "react-native-appwrite-oauth".
Hope this helps
Note: this might be relevant for issue #1177797467
from sdk-for-web.
I was looking for a solution to avoid closed common other backend services.
I think AppWrite is doing that well and it would be so useful if AppWrite supports oauth with reactive-native in the future.
from sdk-for-web.
Related Issues (20)
- 🐛 Bug Report: registration using websdk fails with API fetch loading failed HOT 3
- 🐛 Bug Report: Module appwrite has no member Appwrite HOT 5
- 🚀 Enhancement: Custom type for OAuth2Provider instead of string HOT 2
- Remove cross-fetch and isomorphic-form-data HOT 1
- 🐛 Bug Report: Not able to detect Appwrite Web SDK Types HOT 9
- 🐛 Bug Report: We should remove top level `types` field in `package.json`. HOT 4
- 🚀 Feature: List collections HOT 2
- 🐛 Bug Report: Upload Progress not being reported HOT 3
- 📚 Documentation: missing setSelfSigned on js client HOT 4
- 🐛 Bug Report: storage.createFile() looses mimeType and stops at 0 bytes when uploading HOT 1
- 🚀 Feature: List Teams in Account.get() HOT 2
- 🐛 Bug Report: setting header "X-Fallback-Cookies" gets overwritten on request
- 🚀 Feature: Option to disable Cookies HOT 2
- 🐛 Bug Report: Document autocompletion for Databases.createDocument broken HOT 3
- 🐛 Bug Report: Database listDocuments method return old/cached data HOT 2
- 🚀 Feature: Replace cross-fetch with fetch HOT 2
- 🚀 Feature: Add JSDocstrings (I Closed It) HOT 1
- 🐛 Bug Report: JSDocstrings for functions not appearing in VSCode Intellisense thingy when using Web SDK HOT 1
- 🐛 Bug Report: Node dependencies prevent SSR (like Remix) on Cloudflare Pages HOT 3
- 🐛 Bug Report: cloud.appwrite.io/v1/account/sessions/current 400 (Bad Request) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdk-for-web.