10,000 Matching Annotations
  1. Dec 2023
    1. Are you two serious? Instead of advocating to fix this bug you go out of your way to post another bug report to advocate the devs to dig in their heels?! How about standardizing some devastating needed questions in the technology industry: 1. How does this help productive members of society? 2. Does this serve a useful purpose? 3. Should I be doing this? 4. Have I had a full, non-interrupted, rational conversation with multiple people who disagrees to help determine if I have objectively determined my answers to the first three questions?
    1. An expired ID token does not mean the user is signed out.
    2. and pressed the Confirm button to grant consent and share credentials.
    3. In cases where Google is authoritative the user is confirmed to be the legitimate account owner.

      What about in other cases? The user may have created an account using someone else's e-mail address? Isn't e-mail verification a required step to create the Google Account though? I think so. I think the only case it is trying to warn us of is the one mentioned below:

      email_verfied can also be true as Google initially verified the user when the Google Account was created, however ownership of the third party email account may have since changed.

    1. Because your time is valuable, submit one housing request and be connected with property owners eager to host you.
    1. Something that you're trying to keep the same, in order to achieve goal X (such as a "log lookup time" above).
    2. An invariant is like a rule or an assumption that can be used to dictate the logic of your program.
    3. An invariant (in common sense) means some conditions that must be true at some point in time or even always while your program is executing. e.g. PreConditions and PostConditions can be used to assert some conditions that must be true when a function is called and when it returns. Object invariants can be used to assert that a object must have a valid state throughout the time it exists. This is the design by contract principle.
    4. Modern cars, however, use a single stick that pivots around among the gears. It's designed in such a way that, on a modern stick-shift car, it is not possible to engage two gears at the same time.
    5. In OOP, an invariant is a set of assertions that must always hold true during the life of an object for the program to be valid. It should hold true from the end of the constructor to the start of the destructor whenever the object is not currently executing a method that changes its state.
    1. 42 View upvote and downvote totals. This answer is not useful Save this answer. Show activity on this post. It is a condition you know to always be true at a particular place in your logic
    2. The age of a parent is greater than the age of their biological children.
    3. an invariant is something like of a fixed relationship between varying entities. For example, your age will always be less than that compared to your biological parents. Both your age, and your parent's age changes in the passage of time, but the relationship that i mentioned above is an invariant.
    4. For instance, a binary search tree might have the invariant that for every node, the key of the node's left child is less than the node's own key. A correctly written insertion function for this tree will maintain that invariant. As you can tell, that's not the sort of thing you can store in a variable: it's more a statement about the program. By figuring out what sort of invariants your program should maintain, then reviewing your code to make sure that it actually maintains those invariants, you can avoid logical errors in your code.
    1. The secure OAuth 2.0 protocol lets you safely link a user's Google Account with their account on your platform, thereby granting Google applications and devices access to your services.

      What I still don't understand is... How do you even initiate the Google app to request such access? How would you trigger that? It's not going to show a list of all 100,000 registered apps and ask which of those you'd like to add...

    2. Use cases
    1. This describes account linking from the opposite direction than I'm used to: starting with the Google App, which requests your app to share data from your service with Google.

      As it says on https://developers.google.com/identity/account-linking overview:

      The secure OAuth 2.0 protocol lets you safely link a user's Google Account with their account on your platform, thereby granting Google applications and devices access to your services.

    2. return and HTTP 200 response
    1. This can result in an unwanted increase in fraudulent account creations, or worse; attackers successfully stealing social media account credentials from legitimate users.
    1. A traditional account linking flow requires the user to enter their credentials in the browser. The use of App Flip defers user sign-in to your Android app, which allows you to leverage existing authorizations. If the user is signed in to your app, they don't need to re-enter their credentials to link their account.
    1. You can create variations of your email address where all messages arrive in your current inbox. Just add a plus sign (+) and any word before the @ sign in your current address.
    1. To simulate a Google app and trigger the intent which launches your app, download and install the App Flip Test Tool
    2. To implement App Flip, you need to modify the user authorization code in your app to accept a deep link from Google.
    1. aud
    2. To perform account linking with OAuth and Google Sign-In, follow these general steps: First, ask the user to give consent to access their Google profile. Use the information in their profile to check if the user account exists. For existing users, link the accounts. If you can't find a match for the Google user in your authentication system, validate the ID token received from Google. You can then create a user based on the profile information contained in the ID token.
    1. Don't reply or click any links in a spam message Replying to, clicking on links within, or even attempting to unsubscribe from spam emails typically only informs the sender that they have found an active email address to which they'll send more spam emails.
    1. Whether a personalized button or a generic text button displays has no impact on the UX flows after the button is clicked. The account displayed in the personalized button is not automatically selected.
    2. A personalized button gives users a quick indication of the session status, both on Google's side and on your website, before they click the button. This is especially helpful to end users who visit your website only occasionally. They may forget whether an account has been created or not, and in which way. A personalized button reminds them that Sign In With Google has been used before. Thus, it helps to prevent unnecessary duplicate account creation on your website.

      first sighting: sign-in: problem: forgetting whether an account has been created or not, and in which way

    1. The United States was lagging in the adoption of real-time payments (RTP) before the launch of FedNow because the market is structured on choice rather than mandate
    1. Our freedom of choice in a competitive society rests on the fact that, if one person refuses to satisfy our wishes, we can turn to another. But if we face a monopolist we are at his absolute mercy.
    1. Compared with simple clients, modern clients are generally much easier to use and more Ruby-like
    2. Modern clients are produced by a modern code generator, combined with hand-crafted functionality for some services.
    3. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services.
    4. The libraries in this repo are simple REST clients. These clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
    1. Web server applications
    2. It is generally a best practice to request scopes incrementally, at the time access is required, rather than up front. For example, an app that wants to support saving an event to a calendar should not request Google Calendar access until the user presses the "Add to Calendar" button; see Incremental authorization.
    3. After logging in, the user is asked whether they are willing to grant one or more permissions that your application is requesting. This process is called user consent.
    4. Given the security implications of getting the implementation correct, we strongly encourage you to use OAuth 2.0 libraries when interacting with Google's OAuth 2.0 endpoints. It is a best practice to use well-debugged code provided by others, and it will help you protect yourself and your users. For more information, see Client libraries.
    1. Cross-Account Protection does not currently send security events for Google Workspace (formerly G Suite) users.

      That's a pretty major caveat

    2. For example, if a user's Google Account were compromised, you could temporarily disable Sign In With Google for that user and prevent account recovery emails from being sent to the user's Gmail address.
    1. After you have verified the token, check if the user is already in your user database. If so, establish an authenticated session for the user. If the user isn't yet in your user database, create a new user record from the information in the ID token payload, and establish a session for the user. You can prompt the user for any additional profile information you require when you detect a newly created user in your app.
    2. If so, establish an authenticated session for the user.
    3. Warning: Do not accept plain user IDs, such as those you can get with the GoogleUser.getId() method, on your backend server. A modified client application can send arbitrary user IDs to your server to impersonate users, so you must instead use verifiable ID tokens to securely get the user IDs of signed-in users on the server side.
  2. Nov 2023
    1. If I wanted to integrate this with an existing login system, “signing out” would mean signing out of my own application (and not out of my Google account).
    2. I sign in with my Google account everywhere I can to avoid having yet another password on another random website.
    1. useInterval( () => { if (typeof window !== "undefined" && window.google) { setGoogle(window.google); setGoogleIsLoading(false); } }, googleIsLoading ? 100 : null );
    2. We didn't add this initially because Google is not the only form of authentication we offer and it could get annoying for users that sign up with GitHub or username and password to see the Google popup all the time.
    1. Sign in with Google is based on OAuth 2.0.
    2. At a later time, when accessing data from Google is required, you call the authorization API to ask for the consent and get access tokens for data access. This separation complies with our recommended incremental authorization best practice, in which the permissions are requested in context.
    3. OAuth 2.0 is also the industry-standard protocol for authorization. It provides for a set of endpoints with which relying parties integrate using HTTP.
    4. relying parties

      relying parties

    1. "Sign up with Google"
    2. To mitigate this latency issue, the buttons are rendered in 2 steps, as follows:
    3. The Sign in with Google button redirect flow always uses the POST method to submit the credential to your web server, whereas OAuth redirect normally uses the GET method.

      How does it both do a POST and a redirect? A redirect is by definition a GET. So I assume it does the POST first with the more sensitive and then a GET without the more sensitive data to the redirect URI?

    4. The OAuth 2.0 specification considers HTTP redirection, but lacks guidance on rendering pop-up dialogs.
    5. The user's Google account sign-in status and your app are independent of each other, except during the sign-in moment itself when you know that the user has successfully authenticated and is signed into their Google account. Users may remain signed in, they may sign out, or switch to a different Google account while maintaining an active, signed-in session on your website.
    6. Automatic Sign-in can only happen with One Tap UX, not with the Sign in with Google button UX.
    7. Due to security reasons, it's not allowed to add new Google sessions in an iframe.
    8. are triggered only when users have signed in to Google before loading your web pages. This step is optional for the Sign in with Google button flow, since users are prompted to sign in to Google when the button is pressed.
    1. In contrast to One Tap, the Sign in with Google button flow must be triggered by a user gesture.

      "One tap" sounds like a user gesture -- sounds the same as tapping on a button. So I don't yet see the distinction they are trying to make or undertsand the difference between these options...

    2. A personalized button reminds end users that they have used Sign in with Google before, and thus helps to prevent unnecessary duplicate account creation on your website. This is especially helpful to end users who visit your website only occasionally. They may forget the login methods they used.
    3. Sign in with Google for Web doesn't support silent sign in, in which case a credential is returned without any UI displayed. End users always see some UI, manual or automatic sign in, when a login credential is returned from Google to the relying party. This improves user privacy and control.
    1. Authentication establishes who someone is, and is commonly referred to as user sign-up or sign-in. Authorization is the process of granting or rejecting access to data or resources.
    2. The signed-in status of a Google Account, and your app's session state and signed-in status are distinct, separate concepts. User sign-in status to their Google Account and your app are independent of each other
    1. To improve user privacy, display moment notifications are intentionally delayed a random amount of time when FedCM is enabled.

      How does that improve privacy?

    1. If you have any Workspace organization, and the app is only accessible to users within their own org, then we allow non-public domains for projects in "Internal" mode. See this link on how to make the project internal.

      didn't work for me

    2. I'm going to close this thread which will no longer be monitored. In case you want to report a new issue or you can’t make project to be internal, please do not hesitate to create a new Issue Tracker thread describing your situation.
    1. In development, I was able to reset the exponential cool down by removing the g_state cookie. One method for this might be to add a development-only "Clear Google One Tap Cookie" link that run an server-side action to remove the g_state cookie and then redirect back to the previous page.
    1. The PSL nor its volunteers prescribe what browsers do with entries or their recognition/handling of entries, default behaviours, or other handling. Browsers do what browsers do, diversely, and the PSL is not the boss of them.
    2. mutually-untrusting parties

      first sighting: "mutually-untrusting parties"

    3. In addition, owners of privately-registered domains who themselves issue subdomains to mutually-untrusting parties may wish to be added to the PRIVATE section of the list.
    1. It does provide an answer. The issue is that the Google form validates that the user has input a valid looking URL. So he needs to input an arbitrary, but valid URL, and then add that to /etc/hosts so his browser will resolve it to the address of his devserver. The question and answer are both fine as is and don't require any critique or clarification.

      The critical comment this was apparently in reply to was apparently deleted

    2. You can set "Authorized redirect URI" to local IP (like http://127.0.0.1/callback), it's working fine for me. What really agonizing is that google don't allow user to config an external IP (let's say your server IP like 99.99.99.99) as "Authorized redirect URI", google want the "Authorized redirect URI" to end with a public top-level domain (such as .com or .org).

      Trying to use a local .test domain results in: Invalid Origin: must end with a public top-level domain (such as .com or .org).

      but local IP is allowed. Why this inconsistency?

      And then this one: can use external domain, but not external IP?!

    1. The problem is that when I want to create OAuth client ID in google, it does not accept ".test" domain for "Authorized redirect URIs". It says: Invalid Redirect: must end with a public top-level domain (such as .com or .org). Invalid Redirect: domain must be added to the authorized domains list before submitting. While it accepts .test domain for "Authorized JavaScript origins" part! I saw most of the tutorials when using socialite and google api they set these in google console. http://localhost:8000 and http://localhost:8000/callback/google and google accepts them without problem with domain and generate the key and secret but I am not using mamp and I am going to continue with valet. I would be so thankful if you guide me about what is the alternative domain for .test which works fine in valet and also google accepts it?
    1. AIs are not capable of citing the sources of knowledge used up to the standards of the Stack Exchange network. Even when Artificial Intelligence appears to cite sources for responses, such sources may not be relevant to the original request, or may not exist at all. For Stack Overflow, this means the answer may not honestly or fairly represent the sources of knowledge used, even if someone explicitly cites the Artificial Intelligence as an author in their answer.
    1. The diagram below walks through the social login process from start to finish.
    2. Improved blank slate experiences: After a user signs in using a social media account, site owners have the ability to auto-suggest or auto-populate their settings with information held in their social account. This lets organizations create a first impression of convenience and encourage further use of their apps and site.
    3. Smarter user improvements: When users sign in to an app or site using their social network, site owners can analyze data from that platform to establish user preferences. Developers can then use this insight to create customizable user experiences and build features that are in demand.

      vague

    4. When users sign in to an app or site

      correct

    5. What are the benefits of social login?
    6. Password fatigue is real, and besides the inherent vulnerability of password logins, the idea of remembering yet another password puts users off registering for additional sites.
    1. Sign-in process
    2. Users can use multiple Identity Providers to sign in, and Okta can link all of those profiles to a single Okta user. This is called account linking. For example, a user signs in to your app using a different Identity Provider than they used for registration. Account linking can then establish that the user owns both identities. This allows the user to sign in from either account.
    3. Identity Providers can significantly reduce sign-in and registration friction. This allows your users to easily access applications without needing to create passwords or remember usernames.
    4. External Identity Providers
    1. logIntoMicrosoft

      I think logInToMicrosoft would be slightly better, but this is surely much better than the completely incorrect loginToMicrosoft

    2. loginTo

      Incorrect. Should be logInTo or logInto, same as it is in the other functions, logIntoMicrosoft, ...

    3. // NOTE: The element exists on the original form but is hidden and gets rerendered, which leads to intermittent detached DOM issues cy.contains('Next').click().wait(4000)
    1. Use a single project to hold all platform instances of your app (Android, iOS, web, etc.), each with a different Client ID.
    2. The Google Sign-In server-side flow differs from the OAuth 2.0 for Web server applications flow.
    1. Okta supports the following enterprise and social Identity Provider types:
    2. JSON HAL
    3. curl -v -X POST \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "User-Agent: Mozilla/5.0 (${systemInformation}) ${platform} (${platformDetails}) ${extensions}" \ -H "Authorization: SSWS ${api_token}"
    1. Indicates that the content of the element is an identifier with transient semantics and SHOULD be treated as an opaque and temporary value by the relying party.
    1. // oftentimes once we have a proper e2e test around logging in
      // there is NO more reason to actually use our UI to log in users
      // doing so wastes a huge amount of time, as our entire page has to load
      // all associated resources have to load, we have to wait to fill the
      // form and for the form submission and redirection process
      
    1. // instead of visiting each page and waiting for all // the associated resources to load, we can instead // just issue a simple HTTP request and make an // assertion about the response body cy.request('/admin') .its('body') .should('include', '<h1>Admin</h1>') instead of cy.visit

    1. Moreover, social logins are often implemented in an insecure way. Users, in this case, have to trust every application which implemented this feature to handle their identifier confidentially.
    2. One such way that social media accounts are exploited is when users are enticed to download malicious browser extensions that request read and write permissions on all websites. These users are not aware that later on, typically a week or so after being installed, the extensions will then download some background Javascript malware from its command and control site to run on the user's browser.
    1. When a user signs in, you can link the user’s Facebook account to an existing Okta user profile or choose to create a new user profile using Just-In-Time (JIT) provisioning.
    1. It’s an unfortunate fact that many people use the same credentials to log into different accounts. This password practice is a big part of what enables account takeovers, as it increases the likelihood that hackers can use compromised credentials to access sensitive information across accounts.
    2. As a prevention method, organizations should consider implementing passwordless practices like fingerprints or facial recognition, as well as modern authentication standards like WebAuthn, which remove passwords from the authentication experience. When organizations opt for these authentication methods, they help to mitigate the risk of stolen credentials, and minimize the chance of account takeovers.
    3. For organizations where passwordless authentication is not yet possible, the next best option is to use adaptive multi-factor authentication (Adaptive MFA) as a security measure. This approach monitors the user’s login behavior on the basis of location, device, network, and more to determine which authentication methods to use. If the risk factor is high, then the user would be asked to submit an additional identifying factor such as an TOTP code or a one-time password.

      adaptive multi-factor authentication

    4. In retail or e-commerce settings, this is particularly effective as hackers will often change details, including the shipping or email address, associated with the account. By reacting to that type of change and requesting an additional factor, adaptive MFA can better protect a customer’s sensitive data.

      adaptive multi-factor authentication

    1. organization to user relationship

      I think "user to organization" relationship would be more accurate.

      The "organization to user relationship" seems like it would be the opposite direction: employer, supplier, etc.

    2. The default user profile is based on the System for Cross-domain Identity Management: Core Schema (opens new window) and has following standard properties
    1. The args object is the only mechanism via which data may be injected into the callback, the callback is not a closure and does not retain access to the JavaScript context in which it was declared. Values passed into args must be serializable.
    1. Turbo is a continuation of the ideas from the previous Turbolinks framework, and the heart of that past approach lives on as Turbo Drive.

      a continuation...

    1. It is important that these are not reloadable, because edits would not be reflected in those cached stale objects.
    2. However, depending on your taste, that just might not feel right to you. You might prefer that app/services/users/signup.rb simply defines Services::Users::Signup.
    3. In this example, we still want app/models/shapes/circle.rb to define Circle, not Shapes::Circle. This may be your personal preference to keep things simple, and also avoids refactors in existing code bases. The collapsing feature of Zeitwerk allows us to do that:
    4. This is key for classes and modules that are cached in places that survive reloads, like the Rails framework itself.
    1. Copyright (c) 2019–ω

      ω (or any indefinite placeholder) used as an end year for a copyright

    2. Autoloading in Rails was based on const_missing up to Rails 5. That callback lacks fundamental information like the nesting or the resolution algorithm being used. Because of that, Rails autoloading was not able to match Ruby's semantics, and that introduced a series of issues. Zeitwerk is based on a different technique and fixed Rails autoloading starting with Rails 6.
    3. superclass mismatches or partially-defined namespaces
    4. may define Foo, instead of reopen it
    5. That may be a broken window
    6. descend
    7. Since require has global side-effects, and there is no static way to verify that you have issued the require calls for code that your file depends on, in practice it is very easy to forget some. That introduces bugs that depend on the load order.

      class of bugs

    8. On reload, the namespaces are safe, won't be reloaded. The loader only reloads what it manages, which in this case is the adapter itself.
    9. In Ruby, if you have several files called foo.rb in different directories of $LOAD_PATH and execute require "foo" the first one found gets loaded, and the rest are ignored.
    10. The first example needs a custom inflection rule: loader.inflector.inflect("max_retries" => "MAX_RETRIES") Otherwise, Zeitwerk would expect the file to define MaxRetries.

      Potential problem. What if you need it both ways? A constant named MAX_RETRIES within a certain namespace, but also a higher-level MaxRetries class? Guess you'd have to work around it, probably by just defining MAX_RETRIES inside its parent module...

    1. It would have been fantastic to eschew this ridiculousness, because we all make fun of branded vulnerabilities too, but this was not the right time to make that stand.
    1. Otherwise, M does not respond to works? (NoMethodError) because there was a context switch before the require triggered by autoload returned.
    2. Preventing thread switching itself seems difficult on JVM, and would feel like a hack at best + potential for deadlocks.
    3. If it passed before I would think it was just lucky timings.
    4. I guess we should look at what CRuby does here but the autoload logic in CRuby seems particularly unreadable.
    5. BTW to improve the reliability of that test I believe you would need a sleep (smaller, e.g. of 0.1) between the Thread.new and assert M.works?, otherwise it's likely the M.works? runs first and then the other thread will see the constant is autoloading and wait, and anyway that thread does not check what is defined on M. For the test to fail it needs to be the Thread.new running first and defining the constant but not yet the method, before the main thread keeps running and call the method.
    6. This is a shell script that essentially does the same as the flaky test: #!/bin/sh cat <<EOS > m.rb module M sleep 0.5 def self.works? true end end EOS ruby -I. <<EOS autoload :M, "m" t = Thread.new { M } p M.works? EOS rm m.rb

      Same thing in another language....

    1. If another thread encounters a constant it must autoload, this can cause a deadlock.
    2. If this were to occur in a "child" thread, with a waiting parent inside the Executor, it would cause an unavoidable deadlock: the reload must occur before the child thread is executed, but it cannot be safely performed while the parent thread is mid-execution.
    3. The Executor replaces these with a single more abstract interface.
    1. Shifting the left display down below approximately 50 % of the height extension of the primary monitor (i.e. compromising the physical set-up, but still keeping the secondary display to the left of the primary display) generated a behavior correctly opening windows on the primary display.

      a variation of this worked for me too

    1. Shipping is intended to be 'at cost'
    2. Fog of war terrain system. With the randomised terrain set up, every game is different and forces you to make choices as you uncover your predefined play area and it encourages you to explore every inch of it.  
    3. This is a fully tactile experience. No decks of cards to shuffle, no score tracks, no fiddly cubes, no confusing rules or nuances. Just a fluid set up, play and pack down experience with beautiful components.
    1. In-app custom credentials templates are now supported. When a credentials file does not exist, rails credentials:edit will now try to use lib/templates/rails/credentials/credentials.yml.tt to generate the credentials file, before falling back to the default template. This allows e.g. an open-source Rails app (which would not include encrypted credentials files in its repo) to include a credentials template, so that users who install the app will get a custom pre-filled credentials file when they run rails credentials:edit.
    2. Note that this option is ignored when rails environment is development or test.

      why?

      Seems like it could be desired in those envs as well.

    1. ApplicationController.renderer.render inline: "<%= blog_url %>"
    2. The url_for helpers now support a new option called path_params. This is very useful in situations where you only want to add a required param that is part of the route's URL but for other route not append an extraneous query param.
    1. ActiveRecord::Base.serialize no longer uses YAML by default. YAML isn't particularly performant and can lead to security issues if not used carefully. Unfortunately there isn't really any good serializers in Ruby's stdlib to replace it. The obvious choice would be JSON, which is a fine format for this use case, however the JSON serializer in Ruby's stdlib isn't strict enough, as it fallback to casting unknown types to strings, which could lead to corrupted data. Some third party JSON libraries like Oj have a suitable strict mode.
    1. MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON but it's faster and smaller.
    1. The result is a toolkit so powerful that it allows a single individual to create modern applications upon which they can build a competitive business. The way it used to be.
    1. Some possible aims (also not exhaustive): We agree what code is a 'service' and what is not We agree on the interface we expect for our services We agree on the naming convention we use for services
    2. Non-aims (but may happen anyway):
    3. We decide on app/lib v. lib/ once and for all
    4. As our app grows, an increasing amount of random code is landing in the app/services directory. I'm worried it will become impractical to improve on this, as the number of special cases will only increase. Some pain points off the top of my head (definitely not exhaustive):