authgear / authgear-sdk-ios Goto Github PK
View Code? Open in Web Editor NEWAuthgear authentication SDK for iOS platforms
Home Page: https://www.authgear.com/
Authgear authentication SDK for iOS platforms
Home Page: https://www.authgear.com/
Current behavior is that logging out only revoke the refresh token, but the user session in the web is still valid. After a user log out, and login again, since the session in the web view is still valid, the web view would redirect the user to redirect uri directly without user inputting anything. This is undesirable if user really wants to login with another account.
Adding prompt="login" is the oauth way to suppress the auto-redirect behavior and allow authorization with another account.
Support App2AppOptions
in constructor (1)
Modify finishAuthentication
to pass x_app2app_device_key_jwt
during token exchange (2)
App2AppOptions
is not nullrefreshAccessToken
to pass x_app2app_device_key_jwt
during refresh (1)App2AppOptions
is not null Implement method startApp2AppAuthentication(authorizationEndpoint: String, redirectURI: string)
authorizationEndpoint
with code challenge. Enforce using universal link (2) Implement method approveApp2AppAuthenticationRequest(request: App2AppAuthenticationRequest)
grant_type=urn:authgear:params:oauth:grant-type:app2app
with proper jwt (1)redirect_uri
with code
. Enforce using universal link Implement method rejectApp2AppAuthenticationRequest(request: App2AppAuthenticationRequest, error: Error)
Implement parseApp2AppAuthenticationRequest
url
to obtain client_id
redirect_uri
code_challenge
(1) Implement method handleApp2AppAuthenticationResult(uri: Uri)
finishAuthentication
(2)Use secure enclave if possible
Implement app2app in exmaple app (3)
If we use ASWebAuthenticationSession, there will be an alert with message{appName} want to use {domain} to sign in ...
, some customers might not want the alert. Hence we want an alternative way to complete auth with Authgear web UI.
We want the new solution to be able to handle callback from Authgear server
Note that prompt is actually space-separated values in the OIDC spec. So the precise data type should be an array of string.
Duplicated installation info in Readme and Authgear Doc website
As suggested by @chpapa, should consolidate all info on Authgear Doc website to reduce redundancy and for easier maintenance.
Describe the bug
The "Face ID permission denied" error message is If the developer should performed checking, then it is likely that you have denied the permission of Face ID.
, which is confusing to users.
Authgear Version
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should show clear error messages about the missing access permission for Biometrics features (biometric features can be fingerprint but not Face ID)
Client Env (if applicable, please complete the following information):
prompt=login
to exampleref authgear/authgear-server#1049
configure
can be called more than once.configure
does NOT do network IO.configure
does local file IO.authgear.refreshTokenIfNeeded()
developer should call it before every api call to ensure access token up to dateauthgear.accessToken
get the access token from authgear SDK and inject into their application requestauthgear.clearSessionState()
allow developer to clear SDK logged in state, when they find user session is invalidSession action would not be executed if handler is nil.
authgear-sdk-ios/Sources/Authgear.swift
Line 520 in 1881bab
Currently when encountering error in biometric api, we throw the original error from the native api to user. For user to handle the error more easily, we should provide utils function for user to identify errors, like what we did in js sdk.
All standard attributes and custom attributes should be shown
All "c" in the wechat name should be lower case
In Decodable+Any.swift
, using Optional
, violate typeSugar
lint rule
iOS is using make authentication session for open URL, not sure if this is correct
iOS issue for authgear/authgear-server#1391
When programmatically focus an input field after a navigation event,
By default webkit would not show the keyboard on screen.
There is a workaround (becomeFirstResponder
on viewDidAppear
) would work on iOS16.
Todo: Support iOS16 but not older iOS versions
asWebAuthenticationSession
, wkWebView
and wkWebViewFullScreen
Provide delegate for developer to call WeChat SDK when user click login with wechat
Keep authgearSessionStateDidChange only
shouldRefreshAccessToken can be called in worker thread, and refreshToken etc are read, are variables read/write atomic by default in swift?
https://github.com/authgear/authgear-sdk-ios/blob/master/Sources/Authgear.swift#L110
https://github.com/authgear/authgear-sdk-ios/blob/master/Sources/Authgear.swift#L502
Please refer to authgear/authgear-sdk-android#9 for the rationale.
Video tested on chromium edge 87.0.664.75 windows
Testing on chrome 87.0.4280.141 windows it doesn't seem like a full page load but a loading bar is shown ๐ค
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.