You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+116Lines changed: 116 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -113,3 +113,119 @@ close the window.
113
113
Redirection URL passed to the authentication service must be the same as the URL on which the application is running (schema, host, port if necessary) and the path must point to created HTML file, `/auth.html` in this case. The `callbackUrlScheme` parameter of the `authenticate()` method does not take into account, so it is possible to use a schema for native platforms in the code.
114
114
115
115
For the Sign in with Apple in web_message response mode, postMessage from https://appleid.apple.com is also captured, and the authorization object is returned as a URL fragment encoded as a query string (for compatibility with other providers).
116
+
117
+
## Troubleshooting
118
+
119
+
When you use this package for the first time, there are some problems you may have. These are some of the common solutions
120
+
121
+
### Troubleshooting `callbackUrlScheme`
122
+
123
+
-`callbackUrlScheme` must be a valid schema string or else this wont work.
124
+
- A valid RFC 3986 URL scheme must consist of "a letter and followed by any combination of letters, digits, plus ("+"), period ("."), or hyphen ("-")."
- This means you can not use underscore "_", space " " or uppercase "ABCDEF...". You can not also start with a number. See [RFC3986#page-17](https://www.rfc-editor.org/rfc/rfc3986#page-17)
127
+
- examples of VALID `callbackUrlScheme` are `callback-scheme`, `another.scheme`, `examplescheme`
128
+
- examples of INVALID `callbackUrlScheme` are `callback_scheme`,`1another.scheme`, `exampleScheme`
129
+
130
+
### Troubleshooting Flutter App
131
+
132
+
- You have to tell the `FlutterWebAuth.authenticate` function what your `callbackUrlScheme` is.
133
+
- Example if your `callbackUrlScheme` is `valid-callback-scheme`, your dart code will look like
- Your OAuth Provider must redirect to the valid `callbackUrlScheme` + `://`. This mean if your `callbackUrlScheme` is `validscheme`, your OAuth Provider must redirect to `validscheme://`
- If you are using HTML hyperlinks, it must be a valid `callbackUrlScheme` + `://`. This mean if your `callbackUrlScheme` is `customappname`, your html hyperlink should be `customappname://`
196
+
- example with `HTML`
197
+
198
+
```html
199
+
<a href="customappname://?data1=value1&data2=value2">Go Back to App</a>
200
+
```
201
+
202
+
### Troubleshooting passing data to app
203
+
204
+
- You can pass data back to your app by adding GET query parameters. This means by adding name=value type of data after your `callbackUrlScheme` + `://` + `?`
205
+
- example to pass `access-token` to your app a valid url for that could be
206
+
207
+
```text
208
+
my-callback-schema://?access-token=jdu9292s
209
+
```
210
+
211
+
- You can pass multipe data by concatenating with `&`
212
+
213
+
```text
214
+
my-callback-schema://?data1=value1&data2=value2
215
+
```
216
+
217
+
- example to pass `access-token` and `user_id` to your app a valid url for that could be
0 commit comments