Comments (5)
Hi @chaitba2. To the best of my knowledge, it's not possible to remove the "Cancel" button from the top left of Apple's presented authentication view. Swiftly Salesforce users ASWebAuthenticationSession
and there isn't a configuration parameter to hide the "Cancel" button -- which may be for the best, since there needs to be a way for the user to dismiss the modal.
Swiftly Salesforce will return a cancellation error if the user does tap "Cancel" - that is, you can detect the difference between the user canceling the Salesforce authentication vs. failing to authenticate.
from swiftlysalesforce.
@chaitba2 I will mark this issue as 'closed' but if I didn't answer your question, please reopen.
from swiftlysalesforce.
@chaitba2 I realized I forgot to address your second question: "Also is there a way to bypass login alert?" -- I'll reopen the issue now.
Please elaborate on what you mean by "bypass"? What are you trying to accomplish? Do you want to authenticate to Salesforce with a different OAuth flow, e.g. username-password flow (which is not recommended)? Or are you trying to have Swiftly Salesforce not display the login form when the user's session has expired and your app makes a call to Salesforce?
from swiftlysalesforce.
I want to skip the alert and go directly to the login page. Attached the screenshot of alert.
I tried the following to skip the alert,
in WebAuthenticationSession
class, changed the below line from false to true
session.prefersEphemeralWebBrowserSession = true
and to display login again using the following code with delay
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
Task {
await login()
}
})
Please correct me if am wrong.
from swiftlysalesforce.
@chaitba2 personally I don't like to rely on the delay and I find it hard to 'reason' about what else is going on during that delay. Does it work for you? Why do you not want the alert to display? IMO the alert is common in iOS apps so users aren't put off by it and the code is cleaner.
from swiftlysalesforce.
Related Issues (20)
- Composite resources support HOT 2
- MyRecords() func assumes object has 'ownerId' column HOT 8
- Login migration path for Swift Apps HOT 6
- Support for Anonymous Apex? HOT 7
- Error in fields array: Protocol 'Encodable' as a type cannot conform to the protocol itself HOT 7
- salesforce.search() replacement? in 9.0 HOT 2
- 'group by' count() soql fails in 9.0 HOT 26
- WebAuthenticator.swift:50:30: 'shared' is unavailable in application extensions for iOS HOT 1
- keyNotFound "id" error on simple query HOT 7
- Query with date predicate fail HOT 8
- Minor doc bug HOT 1
- Is there another way to perform salesforce.nextResultPage in V10? HOT 6
- Update links in README.md so they point to latest code version
- Adding SwiftlySalesforce to new project adds V8.0 (master) HOT 4
- Add ability to save files to SFDC & share via Chatter/Slack
- Implementation in ipad Swift Playground. AuthenticationError HOT 3
- README OATH screenshot needs refresh HOT 1
- Unable to use a custom domain to log in HOT 1
- Support for <upsert>
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 swiftlysalesforce.