# Feature Flags: Concepts and a Google Sign-In Example

DevFeed: [Feature Flags: Concepts and a Google Sign-In Example](<https://devfeed.tech/articles/the-complete-guide-to-feature-flags-24988.md>)

Original publisher: [Read original article](<https://codeahoy.com/2021/02/27/feature-flags/>)

Author: umer

Published: 2021-02-27T00:00:00Z

Content type: tutorial

Language: en

Sources: [Code Ahoy - Articles](<https://devfeed.tech/sources/code-ahoy-articles.md>)

Topics: [feature flags](<https://devfeed.tech/topics/feature-flags.md>), [Code](<https://devfeed.tech/topics/code.md>), [Development](<https://devfeed.tech/topics/development.md>), [OAuth](<https://devfeed.tech/topics/oauth.md>), [Google](<https://devfeed.tech/topics/google.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [development](<https://devfeed.tech/tags/development.md>), [feature-flags](<https://devfeed.tech/tags/feature-flags.md>), [git](<https://devfeed.tech/tags/git.md>), [guide](<https://devfeed.tech/tags/guide.md>), [oauth](<https://devfeed.tech/tags/oauth.md>)

## AI overview

This tutorial explains feature flags as a way to change software behavior in production without modifying or redeploying code. It describes use cases such as gradual rollouts, production testing, canary launches, and experimentation, then uses Google sign-in approval delays to illustrate staged feature release.

## Source excerpt

Note: Unlaunch, the feature flagging service referenced in this post, has been shut down. Links to it have been removed. The term feature flags refers to a set of techniques that allow software developers and teams to change the behavior of their system in production without modifying or even deploying code. Because of their ability to modify system behavior on the fly, feature flags are very powerful and versatile. They facilitate many use cases that boost developer productivity and make the user experience better and faster: gradually rolling out new features to users vs big-bang releases, testing in production, canary launches, experimentation and many more. We'll explore feature flag use cases later. But first, let's examine feature flags in depth and see how they work. What is a feature flag? At the core of this amazing concept, lies a dead simple and basic foundation that uses conditional code (if statement) to determine whether to perform an action or not. This is best explained with an example. I'll use a real one that I worked on not too long ago. We wanted to allow our users to sign-in to our site using their Google account. To do this, you first create a developer account with Google and get the OAuth code. The application must be approved by Google before you can use it on your site. Until then, it can only be used in test mode. Traditionally, the code for Google sign-in will be kept in a separate Git branch. When the application is approved by Google, the branch can be merged into develop or main (aka master) so it can be released to users. The challenge was that the verification process may take several weeks. I tested everything locally to make sure it was all working. But I couldn't release it yet, even for internal users. If I merged into develop to deploy the feature on the development environment, it would also release it to production (since release branches were automatically cut off of develop.) To summarize the issue: I wanted to release an un